diff --git a/generate_readme.sh b/generate_readme.sh index a4290ed..8156848 100755 --- a/generate_readme.sh +++ b/generate_readme.sh @@ -30,7 +30,14 @@ for version in \ | sed '/-/!{s/$/_/}' \ | sort -Vr \ | sed 's/_$//'); do - echo "* [v$version](https://github.com/cilium/tetragon/releases/tag/v$version) (_[source](https://github.com/cilium/tetragon/tree/v$version/install/kubernetes)_)" + # Tetragon chart was moved in 1.1 release + TETRAGON_CHART_DIR="install/kubernetes/tetragon" + MAJOR=$(echo "$version" | cut -d. -f1) + MINOR=$(echo "$version" | cut -d. -f2) + if [ "$MAJOR" -lt 1 ] || ([ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 1 ]); then + TETRAGON_CHART_DIR="install/kubernetes" + fi + echo "* [v$version](https://github.com/cilium/tetragon/releases/tag/v$version) (_[source](https://github.com/cilium/tetragon/tree/v$version/$TETRAGON_CHART_DIR)_)" done cat << EOF diff --git a/prepare_tetragon_artifacts.sh b/prepare_tetragon_artifacts.sh index a504eac..156ecd2 100755 --- a/prepare_tetragon_artifacts.sh +++ b/prepare_tetragon_artifacts.sh @@ -19,11 +19,19 @@ if [ -f "tetragon-${VERSION}.tgz" ]; then exit 0 fi +# Tetragon chart was moved in 1.1 release +TETRAGON_CHART_DIR="install/kubernetes/tetragon" +MAJOR=$(echo "$VERSION" | cut -d. -f1) +MINOR=$(echo "$VERSION" | cut -d. -f2) +if [ "$MAJOR" -lt 1 ] || ([ "$MAJOR" -eq 1 ] && [ "$MINOR" -lt 1 ]); then + TETRAGON_CHART_DIR="install/kubernetes" +fi + echo "Generating tetragon package from tag: $TAG" rm -rf tetragon git clone git@github.com:cilium/tetragon.git git_checkout_ref "$(pwd)/tetragon" "$TAG" -helm package -d . tetragon/install/kubernetes --version="${VERSION}" --app-version="${VERSION}" +helm package -d . "tetragon/$TETRAGON_CHART_DIR" --version="${VERSION}" --app-version="${VERSION}" helm repo index . --merge index.yaml ./generate_readme.sh > README.md git add README.md index.yaml tetragon-"$VERSION".tgz