Skip to content

Commit

Permalink
fix: rewrite release procedure for new yq (#750)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demonsthere authored Feb 28, 2025
1 parent 4f044f0 commit f087a13
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,8 @@ endif
deps: .bin/ory .bin/helm .bin/yq .bin/helm-docs .bin/k3d .bin/kubectl

.PHONY: release
release: ory-repo
yq w -i helm/charts/example-idp/Chart.yaml version "${VERSION}"
yq w -i helm/charts/hydra-maester/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/hydra/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/hydra/Chart.yaml "dependencies.(name==hydra-maester).version" "${VERSION}"; \
yq w -i helm/charts/keto/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/kratos/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/kratos-selfservice-ui-node/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/oathkeeper-maester/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/oathkeeper/Chart.yaml version "${VERSION}"; \
yq w -i helm/charts/oathkeeper/Chart.yaml "dependencies.(name==oathkeeper-maester).version" "${VERSION}"; \
release: ory-repo .bin/yq
./scripts/setVersions.sh "${VERSION}"
helm dep update ./helm/charts/oathkeeper/; \
helm package -d docs/helm/charts/ ./helm/charts/oathkeeper/ --version "${VERSION}"; \
helm package -d docs/helm/charts/ ./helm/charts/oathkeeper-maester/ --version "${VERSION}"; \
Expand Down
26 changes: 26 additions & 0 deletions scripts/setVersions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."

progname=$(basename $0)

VERSION="$1"

charts=("example-idp" "hydra-maester" "hydra" "keto" "kratos" "kratos-selfservice-ui-node" "oathkeeper-maester" "oathkeeper")
charts_with_maesters=("hydra" "oathkeeper")

for chart in "${charts[@]}"
do
yq -i ".version = ${VERSION}" "helm/charts/${chart}/Chart.yaml" || {
echo "Failed to update version in 'helm/charts/${chart}/Chart.yaml'"
exit 1
}
done

for chart in "${charts_with_maesters[@]}"
do
yq -i "(.dependencies[] | select(.name == \"${chart}-maester\")).version = ${VERSION}" "helm/charts/${chart}/Chart.yaml" || {
echo "Failed to update version in 'helm/charts/${chart}/Chart.yaml'"
exit 1
}
done

0 comments on commit f087a13

Please sign in to comment.