File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -173,3 +173,34 @@ build-assets-all-local: build-versions-all
173173 just build-assets-local-for ${version}
174174 done
175175
176+ # Remove old branches that had been merged to main
177+ [group (' git' )]
178+ git-clean :
179+ git branch --merged | grep -Ev " (^\* |^\+ |master|main|dev)" | xargs --no-run-if -empty git branch -d
180+
181+ # Create Chore branch for specific Kubernetes Version
182+ [group (' git' )]
183+ git-chore-branch VERSION :
184+ #!/usr/bin/env bash
185+ currentBranch=$(git branch --show-current)
186+ git switch -c chore/ update-{{ replace (VERSION, " -" , " ." ) }}
187+ cp -r providers/ openstack/ out/ {{ replace (VERSION, " ." , " -" ) }} / * providers/ openstack/ scs/
188+ git add providers/ openstack/ scs/
189+ git commit -s -S -m " chore(versions): Update Release for {{ replace (VERSION, " -" , " ." ) }} "
190+ #git push
191+ git switch ${currentBranch}
192+
193+ # Create chore branches for all available out versions
194+ [group (' git' )]
195+ git-chore-branches-all :
196+ #!/usr/bin/env bash
197+ if ! [[ -e providers/ openstack/ out ]]; then
198+ echo " Error: out directory does not exists."
199+ else
200+ pushd providers/ openstack/ out
201+ versions=$(echo *)
202+ popd
203+ for version in ${versions[@]}; do
204+ just git-chore-branch $version
205+ done
206+ fi
You can’t perform that action at this time.
0 commit comments