File tree 3 files changed +39
-0
lines changed
3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -85,4 +85,7 @@ uml PATH:
85
85
PLANTUML_LIMIT_SIZE=16384 plantuml sources.txt && open sources.png
86
86
rm sources.cmapx
87
87
88
+ bump-version :
89
+ @ sh ./ scripts/ bump-version-and-commit.sh patch
90
+
88
91
mod core
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ bump=${1:- patch}
5
+ file=" Gem.xcodeproj/project.pbxproj"
6
+
7
+ version=$( sh ./scripts/bump-version.sh " $bump " )
8
+ git add " $file "
9
+ git commit -m " Bump to $version " > /dev/null
10
+
11
+ echo " ✅ Version bumped to $version and changes committed."
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ file=" Gem.xcodeproj/project.pbxproj"
5
+ bump=${1:- patch} # default to patch
6
+
7
+ version=$( grep -oE " MARKETING_VERSION = [0-9]+\.[0-9]+\.[0-9]+;" " $file " | head -n1 | grep -oE " [0-9]+\.[0-9]+\.[0-9]+" )
8
+ if [[ -z " $version " ]]; then
9
+ echo " ❌ No MARKETING_VERSION found in $file " >&2
10
+ exit 1
11
+ fi
12
+
13
+ IFS=" ." read -r major minor patch <<< " $version"
14
+
15
+ case " $bump " in
16
+ major) major=$(( major + 1 )) ; minor=0; patch=0 ;;
17
+ minor) minor=$(( minor + 1 )) ; patch=0 ;;
18
+ patch) patch=$(( patch + 1 )) ;;
19
+ * ) echo " ❌ Invalid bump type: $bump " >&2 ; exit 1 ;;
20
+ esac
21
+
22
+ new_version=" ${major} .${minor} .${patch} "
23
+ sed -i ' ' " s/MARKETING_VERSION = $version ;/MARKETING_VERSION = $new_version ;/g" " $file "
24
+
25
+ echo " $new_version "
You can’t perform that action at this time.
0 commit comments