diff --git a/.github/add_annotation.sh b/.github/add_annotation.sh index 86649fd3..a9651901 100755 --- a/.github/add_annotation.sh +++ b/.github/add_annotation.sh @@ -22,13 +22,11 @@ if ! command -v yq &> /dev/null; then fi -if [ "$RELEASE_TYPE" = "" ]; then +if [ "$RELEASE_TYPE" = "official" ]; then # Production release yq eval ".annotations.\"artifacthub.io/prerelease\" = \"false\"" deploy/helm/Chart.yaml -i else yq eval ".annotations.\"artifacthub.io/prerelease\" = \"true\"" deploy/helm/Chart.yaml -i -fi - - +fi \ No newline at end of file diff --git a/.github/cr.sh b/.github/cr.sh index 804b312c..30958246 100755 --- a/.github/cr.sh +++ b/.github/cr.sh @@ -18,14 +18,16 @@ 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) - PRE_RELEASE="--prerelease --latest=false" + PRE_RELEASE_CMD="--prerelease --latest=false" + RELEASE="alpha" 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) - PRE_RELEASE="" + PRE_RELEASE_CMD="" + RELEASE="official" fi - .github/add_annotation.sh deploy/helm/Chart.yaml $PRE_RELEASE + .github/add_annotation.sh deploy/helm/Chart.yaml $RELEASE echo "Packaging chart ..." cr package "deploy/helm" @@ -39,7 +41,7 @@ main() { echo "Release name: $RELEASE_NAME" echo "Release file: $RELEASE_FILE" echo "Previous tag: $PREVIOUS_TAG" - echo "Prerelease opt: $PRE_RELEASE" + echo "Prerelease opt: $PRE_RELEASE_CMD" echo "****************************************" echo "" echo "" @@ -47,7 +49,7 @@ main() { echo 'Releasing chart...' gh release create $RELEASE_NAME \ --title $RELEASE_NAME \ - $PRE_RELEASE \ + $PRE_RELEASE_CMD \ --title $RELEASE_NAME \ --notes-start-tag $PREVIOUS_TAG \ --generate-notes \ diff --git a/deploy/helm/Chart.yaml b/deploy/helm/Chart.yaml index 31116e68..810139ec 100644 --- a/deploy/helm/Chart.yaml +++ b/deploy/helm/Chart.yaml @@ -37,4 +37,4 @@ annotations: whitelisted: true - name: ebpf-reducer image: solarwinds/opentelemetry-ebpf-reducer:v0.10.2 - whitelisted: true + whitelisted: true \ No newline at end of file