mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +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
|
||||
DIR=$(pwd)
|
||||
cd ~/git-repos/cloud-configuration/helm/$1
|
||||
helm package --sign --key "github@2martens.de" --keyring ~/.gnupg/secring.gpg .
|
||||
mv *.tgz *.tgz.prov ~/git-repos/helm-charts/charts
|
||||
cd ~/git-repos/helm-charts/charts
|
||||
|
||||
packages=""
|
||||
for package in "$@"
|
||||
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 add .
|
||||
git commit -m "Upgraded $1"
|
||||
git commit -m "Upgraded $packages"
|
||||
git push
|
||||
cd $DIR
|
||||
cd "$DIR" || exit;
|
||||
|
||||
Reference in New Issue
Block a user