Skip to content

Commit

Permalink
CR Bump + mark alpha releases as pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslav-fedor-swi committed Sep 18, 2024
1 parent 8635683 commit 7b5caba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ main() {
if [[ "$RELEASE_NAME" == *"alpha"* ]]; then
echo "Handling alpha release: $RELEASE_NAME"
PREVIOUS_TAG=$(git tag --sort=version:refname | grep alpha | grep -B1 "^swo-k8s-collector" | tail -n 1)
LATEST_RELEASE=false
LATEST_RELEASE="false"
else
echo "Handling standard release: $RELEASE_NAME"
PREVIOUS_TAG=$(git tag --sort=version:refname | grep -v alpha | grep -B1 "^swo-k8s-collector" | tail -n 1)
LATEST_RELEASE=true
LATEST_RELEASE="true"
fi

echo "Latest Release: $LATEST_RELEASE"
GIT_PATH="deploy"
echo "# Changed:" > deploy/helm/release-notes.md
git log "$PREVIOUS_TAG"..HEAD --pretty=format:"%s" -- $GIT_PATH | grep -v Merge | awk '{print "* " $0}' >> deploy/helm/release-notes.md
Expand All @@ -47,14 +47,11 @@ main() {


echo 'Releasing chart...'
cr upload -c "$(git rev-parse HEAD)" --release-notes-file=release-notes.md --make-release-latest=$LATEST_RELEASE

cr upload -c "$(git rev-parse HEAD)" --release-notes-file=release-notes.md --make-release-lates false

echo 'Updating chart repo index...'
cr index


exit 0
echo 'Pushing update...'
push_files "$RELEASE_NAME"

Expand All @@ -63,7 +60,7 @@ main() {
}

install_chart_releaser() {
local version="v1.5.0"
local version="v1.6.0"
local install_dir="$RUNNER_TOOL_CACHE/cr/$version/$(uname -m)"
if [[ ! -d "$install_dir" ]]; then
mkdir -p "$install_dir"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/releaseHelm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
submodules: true
fetch-depth: 0

- name: Setup git user
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Set up Helm
uses: azure/[email protected]
with:
Expand Down

0 comments on commit 7b5caba

Please sign in to comment.