diff --git a/mobile_files/.babelrc b/.babelrc similarity index 100% rename from mobile_files/.babelrc rename to .babelrc diff --git a/.gitignore b/.gitignore index 66d6a2c56c..017880e82c 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,6 @@ project.xcworkspace # node_modules/ npm-debug.log -.babelrc yarn-error.log default.realm/ @@ -119,7 +118,6 @@ fastlane/README.md .dir-locals.el #ignore platform-specific files in the root since they are only symlinks to files in folders 'desktop_files' and 'mobile_files' -/VERSION /package-lock.json /package.json /metro.config.js diff --git a/desktop_files/VERSION b/VERSION similarity index 100% rename from desktop_files/VERSION rename to VERSION diff --git a/ci/android.groovy b/ci/android.groovy index 3e4e630f06..0450946495 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -11,7 +11,7 @@ def bundle() { /* PR builds shouldn't replace normal releases */ target = 'pr' } else if (btype == 'release') { - gradleOpt += "-PreleaseVersion='${utils.getVersion('mobile_files')}'" + gradleOpt += "-PreleaseVersion='${utils.getVersion()}'" } dir('android') { withCredentials([ diff --git a/ci/github.groovy b/ci/github.groovy index 62432a654f..3f8018fe46 100644 --- a/ci/github.groovy +++ b/ci/github.groovy @@ -182,7 +182,7 @@ def publishRelease(Map args) { def publishReleaseMobile() { publishRelease( - version: utils.getVersion('mobile_files')+'-mobile', + version: utils.getVersion()+'-mobile', pkgDir: 'pkg', files: [ /* upload only mobile release files */ utils.pkgFilename(btype, 'ipa'), diff --git a/ci/ios.groovy b/ci/ios.groovy index e0322ab921..7f3c9268cc 100644 --- a/ci/ios.groovy +++ b/ci/ios.groovy @@ -18,7 +18,7 @@ def bundle() { } /* configure build metadata */ nix.shell( - plutil('CFBundleShortVersionString', utils.getVersion('mobile_files')) + + plutil('CFBundleShortVersionString', utils.getVersion()) + plutil('CFBundleVersion', utils.genBuildNumber()) + plutil('CFBundleBuildUrl', currentBuild.absoluteUrl) ) diff --git a/ci/utils.groovy b/ci/utils.groovy index c7621bb4ce..2f49a4b9ad 100644 --- a/ci/utils.groovy +++ b/ci/utils.groovy @@ -1,11 +1,7 @@ nix = load 'ci/nix.groovy' -def getVersion(type = null) { - /* if type is undefined we get VERSION from repo root */ +def getVersion() { def path = "${env.WORKSPACE}/VERSION" - if (type != null) { - path = "${env.WORKSPACE}/${type}/VERSION" - } return readFile(path).trim() } diff --git a/desktop_files/.babelrc b/desktop_files/.babelrc deleted file mode 100644 index d4b74b5be7..0000000000 --- a/desktop_files/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["module:metro-react-native-babel-preset"] -} diff --git a/ios/scripts/set_xcode_version.sh b/ios/scripts/set_xcode_version.sh index cb266218c3..cefc00d974 100755 --- a/ios/scripts/set_xcode_version.sh +++ b/ios/scripts/set_xcode_version.sh @@ -22,7 +22,7 @@ INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" if [[ $(git ls-files -m "StatusIm/Info.plist") = *"Info.plist"* ]]; then echo "version was set in Info.plist" else - RELEASE_VERSION=$(cat ../VERSION) + RELEASE_VERSION=$(cat ../../VERSION) BUILD_NO=$(bash ../scripts/build_no.sh) # For debugging: diff --git a/mobile_files/VERSION b/mobile_files/VERSION deleted file mode 100644 index a803cc227f..0000000000 --- a/mobile_files/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.14.0 diff --git a/scripts/build-desktop.sh b/scripts/build-desktop.sh index 835067cb1c..ad7fe1e89d 100755 --- a/scripts/build-desktop.sh +++ b/scripts/build-desktop.sh @@ -185,7 +185,7 @@ function compile() { function bundleWindows() { local buildType="$1" - local version_file="${STATUSREACTPATH}/desktop_files/VERSION" + local version_file="${STATUSREACTPATH}/VERSION" VERSION=$(cat $version_file) if [ -z "$VERSION" ]; then echo "${RED}Could not read version from ${version_file}!${NC}" diff --git a/scripts/prepare-for-platform.sh b/scripts/prepare-for-platform.sh index 77e14d1f40..2199e234fc 100755 --- a/scripts/prepare-for-platform.sh +++ b/scripts/prepare-for-platform.sh @@ -44,20 +44,14 @@ fi $GIT_ROOT/scripts/run-environment-check.sh $1 -if [ ! -f .babelrc ] || [ $(readlink .babelrc) != "${PLATFORM_FOLDER}/.babelrc" ]; then +if [ ! -f package.json ] || [ $(readlink package.json) != "${PLATFORM_FOLDER}/package.json.orig" ]; then echo "Creating link: package.json -> ${PLATFORM_FOLDER}/package.json.orig" ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json echo "Creating link: yarn.lock -> ${PLATFORM_FOLDER}/yarn.lock" ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock - echo "Creating link: VERSION -> ${PLATFORM_FOLDER}/VERSION" - ln -sf ${PLATFORM_FOLDER}/VERSION VERSION - - echo "Creating link: .babelrc -> ${PLATFORM_FOLDER}/.babelrc" - ln -sf ${PLATFORM_FOLDER}/.babelrc .babelrc - - echo "Creating link: .babelrc -> ${PLATFORM_FOLDER}/.babelrc" + echo "Creating link: metro.config.js -> ${PLATFORM_FOLDER}/metro.config.js" ln -sf ${PLATFORM_FOLDER}/metro.config.js metro.config.js fi