ci: fix what version is set for iOS PR builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
3fe1d6e3eb
commit
b95056f3ce
|
@ -103,6 +103,7 @@ Statusgo.framework
|
||||||
/ios/Pods/
|
/ios/Pods/
|
||||||
/ios/StatusIm.xcworkspace
|
/ios/StatusIm.xcworkspace
|
||||||
/ios/react-native-xcode.log
|
/ios/react-native-xcode.log
|
||||||
|
/ios/set_xcode_version.log
|
||||||
.ruby-version
|
.ruby-version
|
||||||
status-e2e/
|
status-e2e/
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos-xcode-11.5' }
|
agent { label 'macos-xcode-11.5' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos-xcode-11.5' }
|
agent { label 'macos-xcode-11.5' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label params.AGENT_LABEL }
|
agent { label params.AGENT_LABEL }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos' }
|
agent { label 'macos' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-react-jenkins@v1.1.8'
|
library 'status-react-jenkins@v1.1.9'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -678,7 +678,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 1;
|
runOnlyForDeploymentPostprocessing = 1;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "#!/usr/bin/env bash\n\nsource \"${PROJECT_DIR}/scripts/set_xcode_version.sh\"";
|
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ./set_xcode_version.log 2>&1";
|
||||||
};
|
};
|
||||||
3AAD2AD824A3A60E0075D594 /* [CP] Copy Pods Resources */ = {
|
3AAD2AD824A3A60E0075D594 /* [CP] Copy Pods Resources */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
@ -754,7 +754,7 @@
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 1;
|
runOnlyForDeploymentPostprocessing = 1;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "#!/usr/bin/env bash\n\nsource \"${PROJECT_DIR}/scripts/set_xcode_version.sh\"";
|
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ./set_xcode_version.log 2>&1";
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
|
|
@ -6,29 +6,29 @@
|
||||||
# To use this script in Xcode, add the script's path to a "Run Script" build
|
# To use this script in Xcode, add the script's path to a "Run Script" build
|
||||||
# phase for your application target.
|
# phase for your application target.
|
||||||
|
|
||||||
|
set -x
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
# First, check for git in $PATH
|
# First, check for git in $PATH
|
||||||
hash git 2>/dev/null || { echo >&2 "Git required, not installed. Aborting build number update script."; exit 0; }
|
hash git 2>/dev/null || { echo >&2 "Git required, not installed. Aborting build number update script."; exit 0; }
|
||||||
|
|
||||||
# Alternatively, we could use Xcode's copy of the Git binary,
|
# Run Script build phases that operate on product files of the target
|
||||||
# but old Xcodes don't have this.
|
# that defines them should use the value of this build setting [TARGET_BUILD_DIR].
|
||||||
#GIT=$(xcrun -find git)
|
# But Run Script build phases that operate on product files of other targets should use ?BUILT_PRODUCTS_DIR? instead.
|
||||||
|
|
||||||
# Run Script build phases that operate on product files of the target that defines them should use the value of this build setting [TARGET_BUILD_DIR]. But Run Script build phases that operate on product files of other targets should use ?BUILT_PRODUCTS_DIR? instead.
|
|
||||||
INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
|
INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
|
||||||
|
|
||||||
if [[ $(git ls-files -m "StatusIm/Info.plist") = *"Info.plist"* ]]; then
|
if [[ $(git ls-files -m "StatusIm/Info.plist") = *"Info.plist"* ]]; then
|
||||||
echo "version was set in Info.plist"
|
echo "version was set in Info.plist"
|
||||||
else
|
exit 0
|
||||||
RELEASE_VERSION=$(cat ../../VERSION)
|
fi
|
||||||
|
|
||||||
|
RELEASE_VERSION=$(cat ../VERSION)
|
||||||
BUILD_NO=$(bash ../scripts/version/build_no.sh)
|
BUILD_NO=$(bash ../scripts/version/build_no.sh)
|
||||||
|
|
||||||
# For debugging:
|
# For debugging:
|
||||||
echo "SHORT VERSION: $RELEASE_VERSION"
|
echo "SHORT VERSION: ${RELEASE_VERSION}"
|
||||||
echo "BUILD NO: $BUILD_NO"
|
echo "BUILD NO: ${BUILD_NO}"
|
||||||
|
|
||||||
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $BUILD_NO" "$INFO_PLIST" 2>/dev/null || /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NO" "$INFO_PLIST"
|
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${BUILD_NO}" "${INFO_PLIST}"
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $RELEASE_VERSION" "$INFO_PLIST"
|
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${RELEASE_VERSION}" "${INFO_PLIST}"
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue