Skip to content

Commit

Permalink
push all old versions now
Browse files Browse the repository at this point in the history
  • Loading branch information
max-rocket-internet committed Oct 22, 2024
1 parent 9d5a230 commit 93fc884
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions ci/upload-old-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

CHARTS=$(ls -1 stable/)

count=0

while true; do
echo "."
for chart in $CHARTS; do
if [ ! -d "stable/$chart" ]; then
echo "skipping stable/$chart, does not exist"
continue
fi
chart_env_name=$(echo $chart | sed 's/-/_/g')
current_version=$(yq '.version' stable/$chart/Chart.yaml)
previous_version_env_name=$chart_env_name
previous_version=${!previous_version_env_name}
# echo "chart_env_name $chart_env_name current_version $current_version previous_version $previous_version"
if [[ "$current_version" == "$previous_version" ]]; then
# echo "skipping chart $chart, version $current_version is the same as previous ($previous_version)"
continue
fi
echo "Building and pushing $chart $current_version"
Expand All @@ -27,10 +26,5 @@ while true; do
previous_commit=$(git log --oneline | head -2 | tail -1 | cut -f1 -d' ')
echo "Moving to previous commit: $previous_commit ..."
git reset --hard $previous_commit --quiet
count=$((count + 1))
echo "=================================================================================="
if [ "$count" -gt 10 ]; then
echo "done"
exit 0
fi
done

0 comments on commit 93fc884

Please sign in to comment.