From 53ad6544e0c673e787ed9238fcc5423c302c2426 Mon Sep 17 00:00:00 2001 From: Daniil Subbotin Date: Fri, 27 Nov 2020 17:00:08 +0300 Subject: [PATCH] Add scripts to increment version number --- Scripts/increment_major_version.command | 4 ++++ Scripts/increment_minor_version.command | 4 ++++ 2 files changed, 8 insertions(+) create mode 100755 Scripts/increment_major_version.command create mode 100755 Scripts/increment_minor_version.command diff --git a/Scripts/increment_major_version.command b/Scripts/increment_major_version.command new file mode 100755 index 00000000..98e86696 --- /dev/null +++ b/Scripts/increment_major_version.command @@ -0,0 +1,4 @@ +cd "$( dirname "${BASH_SOURCE[0]}" )" +cd .. +perl -i -pe 's/\b(\d+)(?=.\d+")/$1+1/e' FigmaExport.podspec +perl -i -pe 's/\b(\d+)(?=.\d+")/$1+1/e' ./Sources/FigmaExport/Subcommands/VersionOptions.swift \ No newline at end of file diff --git a/Scripts/increment_minor_version.command b/Scripts/increment_minor_version.command new file mode 100755 index 00000000..10db1a12 --- /dev/null +++ b/Scripts/increment_minor_version.command @@ -0,0 +1,4 @@ +cd "$( dirname "${BASH_SOURCE[0]}" )" +cd .. +perl -i -pe 's/\b(\d+)(?=\D*$)/$1+1/e' FigmaExport.podspec +perl -i -pe 's/\b(\d+)(?=\D*$)/$1+1/e' ./Sources/FigmaExport/Subcommands/VersionOptions.swift \ No newline at end of file