rename_cura_1_tags.sh 655 B

1234567891011121314
  1. #Renames tags that were for Legacy Cura to a newer versioning system.
  2. #Those Cura versions used tags based on the year of release.
  3. #We'd like to rename them to be "Cura 1" and have the original version number as sub-version-numbers.
  4. #So Cura 14.04 becomes Cura 1.14.04.
  5. for i in $(git tag -l)
  6. do
  7. if [[ $i =~ ^1[2-5]\.[0-9][0-9] ]]; then #E.g. 12.04 or 15.06. Note that there is no end-match so anything that starts with this matches.
  8. echo "Renaming tag $i to 1.$i";
  9. git tag 1.$i $i; #Create new tag (1.x instead of x).
  10. git tag -d $i; #Delete old tag.
  11. git push origin 1.$i :$i #Rename the tag remotely too.
  12. fi
  13. done