Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/v0.44.1 #47

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions .github/workflows/docs-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
- feature/*
- release/*
- hotfix/*
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
docs-publish:
Expand All @@ -26,16 +24,34 @@ jobs:

- name: Build, validate documentation using MkDocs
run: |
mkdocs build --verbose --clean --strict
mkdocs build --clean --strict
rm -r site/

- name: Build, publish, version documentation using Mike (only for stable tags)
if: startsWith(github.ref, 'refs/tags/')
- name: Build, publish, version documentation using Mike (only for master)
if: github.ref == 'refs/heads/master'
run: |
# constants for selecting branches
readonly GITHUB_ORG="${GITHUB_REPOSITORY_OWNER}"

function resolve_release_envs() {
echo "Git commit message:"
GIT_COMMIT_MSG="$(git log -1 --pretty=format:"%s")"
echo "${GIT_COMMIT_MSG}"

if [[ ! "${GIT_COMMIT_MSG}" =~ ^Merge\ pull\ request\ #[0-9]+\ from\ ${GITHUB_ORG}/(hotfix|release)/(v[0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
>&2 echo "Pushes to master should be done via merges of PR requests from hotfix/vN.N.N or release/vN.N.N branches only."
>&2 echo "The expected message format (will be used for parsing a release tag):"
>&2 echo "Merge pull request #N from ${GITHUB_ORG}/hotfix/vN.N.N or ${GITHUB_ORG}/release/vN.N.N."
exit 1
fi

VERSION="${BASH_REMATCH[2]}"
}

echo "Configure Git user.name and user.email."
git config user.name github-actions
git config user.email [email protected]

VERSION=${GITHUB_REF#refs/tags/}

echo "Publish documentation"
resolve_release_envs
mike deploy --update-aliases --push --rebase "${VERSION}" latest
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
readonly GIT_BRANCH="${GITHUB_REF_NAME}"
readonly GITHUB_ORG="${GITHUB_REPOSITORY_OWNER}"

function release() {
function resolve_release_envs() {
echo "Git commit message:"
GIT_COMMIT_MSG="$(git log -1 --pretty=format:"%s")"
echo "${GIT_COMMIT_MSG}"
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
fi
;;
master)
release
resolve_release_envs
;;
esac

Expand Down
6 changes: 3 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ rmk

Command line tool for reduced management of the provision of Kubernetes clusters in different environments and management of service releases.

**BuiltBy:** goreleaser \
**Commit:** 25e5886 \
**Date:** 2024-09-03T15:03:12Z \
**BuiltBy:** goreleaser <br />
**Commit:** 0370089 <br />
**Date:** 2024-09-03T16:41:40Z <br />
**Target:** linux_amd64

**Usage**:
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ GLOBAL OPTIONS:

Command line tool for reduced management of the provision of Kubernetes clusters in different environments and management of service releases.

**BuiltBy:** ` + builtBy + ` \
**Commit:** ` + commit + ` \
**Date:** ` + date + ` \
**BuiltBy:** ` + builtBy + ` <br />
**Commit:** ` + commit + ` <br />
**Date:** ` + date + ` <br />
**Target:** ` + target + `
{{ end }}
**Usage**:
Expand Down