fix: versioning issue in ios singbox platform extension
This commit is contained in:
12
Makefile
12
Makefile
@@ -137,7 +137,11 @@ release: # Create a new tag for release.
|
|||||||
@echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))"
|
@echo "previous version was $$(git describe --tags $$(git rev-list --tags --max-count=1))"
|
||||||
@echo "WARNING: This operation will creates version tag and push to github"
|
@echo "WARNING: This operation will creates version tag and push to github"
|
||||||
@bash -c '\
|
@bash -c '\
|
||||||
read -p "Version? (provide the next x.y.z semver) : " TAG && \
|
cversion_string=`grep -e "^version:" pubspec.yaml | cut -d: -f2-`; \
|
||||||
|
cstr_version=`echo "$${cversion_string}" | sed -n "s/[ ]*\\([0-9]\\+\\.[0-9]\\+\\.[0-9]\\+\\)+.*/\\1/p"`; \
|
||||||
|
cbuild_number=`echo "$${cversion_string}" | sed -n "s/.*+\\([0-9]\\+\\)/\\1/p"`; \
|
||||||
|
echo "Current Version Name:$${cstr_version} Build Number:$${cbuild_number}";\
|
||||||
|
read -p "new Version? (provide the next x.y.z semver) : " TAG && \
|
||||||
echo $$TAG &&\
|
echo $$TAG &&\
|
||||||
[[ "$$TAG" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(\.dev)?$$ ]] || { echo "Incorrect tag. e.g., 1.2.3 or 1.2.3.dev"; exit 1; } && \
|
[[ "$$TAG" =~ ^[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}(\.dev)?$$ ]] || { echo "Incorrect tag. e.g., 1.2.3 or 1.2.3.dev"; exit 1; } && \
|
||||||
IFS="." read -r -a VERSION_ARRAY <<< "$$TAG" && \
|
IFS="." read -r -a VERSION_ARRAY <<< "$$TAG" && \
|
||||||
@@ -145,9 +149,9 @@ release: # Create a new tag for release.
|
|||||||
BUILD_NUMBER=$$(( $${VERSION_ARRAY[0]} * 10000 + $${VERSION_ARRAY[1]} * 100 + $${VERSION_ARRAY[2]} )) && \
|
BUILD_NUMBER=$$(( $${VERSION_ARRAY[0]} * 10000 + $${VERSION_ARRAY[1]} * 100 + $${VERSION_ARRAY[2]} )) && \
|
||||||
echo "version: $${VERSION_STR}+$${BUILD_NUMBER}" && \
|
echo "version: $${VERSION_STR}+$${BUILD_NUMBER}" && \
|
||||||
sed -i "s/^version: .*/version: $${VERSION_STR}\+$${BUILD_NUMBER}/g" pubspec.yaml && \
|
sed -i "s/^version: .*/version: $${VERSION_STR}\+$${BUILD_NUMBER}/g" pubspec.yaml && \
|
||||||
git tag $${TAG} > /dev/null && \
|
sed -i "s/CURRENT_PROJECT_VERSION = $${cbuild_number}/CURRENT_PROJECT_VERSION = $${BUILD_NUMBER}/g" ios/Runner.xcodeproj/project.pbxproj && \
|
||||||
git tag -d $${TAG} > /dev/null && \
|
sed -i "s/MARKETING_VERSION = $${cstr_version}/MARKETING_VERSION = $${VERSION_STR}/g" ios/Runner.xcodeproj/project.pbxproj && \
|
||||||
git add pubspec.yaml CHANGELOG.md && \
|
git add ios/Runner.xcodeproj/project.pbxproj pubspec.yaml&& \
|
||||||
git commit -m "release: version $${TAG}" && \
|
git commit -m "release: version $${TAG}" && \
|
||||||
echo "creating git tag : v$${TAG}" && \
|
echo "creating git tag : v$${TAG}" && \
|
||||||
git tag v$${TAG} && \
|
git tag v$${TAG} && \
|
||||||
|
|||||||
Reference in New Issue
Block a user