mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
Improved script to release multiple packages at the same time
This commit is contained in:
@@ -1,11 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
DIR=$(pwd)
|
DIR=$(pwd)
|
||||||
cd ~/git-repos/cloud-configuration/helm/$1
|
|
||||||
helm package --sign --key "github@2martens.de" --keyring ~/.gnupg/secring.gpg .
|
packages=""
|
||||||
mv *.tgz *.tgz.prov ~/git-repos/helm-charts/charts
|
for package in "$@"
|
||||||
cd ~/git-repos/helm-charts/charts
|
do
|
||||||
|
if [ -z "$packages" ];
|
||||||
|
then
|
||||||
|
packages+="$package"
|
||||||
|
else
|
||||||
|
packages+=", $package"
|
||||||
|
fi
|
||||||
|
cd "$HOME/git-repos/cloud-configuration/helm/$package" || { echo "Cannot find $package under $HOME/git-repos/cloud-configuration/helm/"; exit 1; }
|
||||||
|
helm package --sign --key "github@2martens.de" --keyring ~/.gnupg/secring.gpg .
|
||||||
|
mv -- *.tgz *.tgz.prov ~/git-repos/helm-charts/charts
|
||||||
|
done
|
||||||
|
cd ~/git-repos/helm-charts/charts || { echo "$HOME/git-repos/helm-charts/charts/ does not exist"; exit 1; }
|
||||||
git pull
|
git pull
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Upgraded $1"
|
git commit -m "Upgraded $packages"
|
||||||
git push
|
git push
|
||||||
cd $DIR
|
cd "$DIR" || exit;
|
||||||
|
|||||||
Reference in New Issue
Block a user