Move files that don't change per platform to the root

This commit is contained in:
Pedro Pombeiro 2019-06-04 18:50:29 +02:00
parent 04de022eae
commit ab11a67c96
No known key found for this signature in database
GPG Key ID: C4A24185B2AA48A1
12 changed files with 8 additions and 24 deletions

2
.gitignore vendored
View File

@ -42,7 +42,6 @@ project.xcworkspace
# #
node_modules/ node_modules/
npm-debug.log npm-debug.log
.babelrc
yarn-error.log yarn-error.log
default.realm/ default.realm/
@ -119,7 +118,6 @@ fastlane/README.md
.dir-locals.el .dir-locals.el
#ignore platform-specific files in the root since they are only symlinks to files in folders 'desktop_files' and 'mobile_files' #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-lock.json
/package.json /package.json
/metro.config.js /metro.config.js

View File

@ -11,7 +11,7 @@ def bundle() {
/* PR builds shouldn't replace normal releases */ /* PR builds shouldn't replace normal releases */
target = 'pr' target = 'pr'
} else if (btype == 'release') { } else if (btype == 'release') {
gradleOpt += "-PreleaseVersion='${utils.getVersion('mobile_files')}'" gradleOpt += "-PreleaseVersion='${utils.getVersion()}'"
} }
dir('android') { dir('android') {
withCredentials([ withCredentials([

View File

@ -182,7 +182,7 @@ def publishRelease(Map args) {
def publishReleaseMobile() { def publishReleaseMobile() {
publishRelease( publishRelease(
version: utils.getVersion('mobile_files')+'-mobile', version: utils.getVersion()+'-mobile',
pkgDir: 'pkg', pkgDir: 'pkg',
files: [ /* upload only mobile release files */ files: [ /* upload only mobile release files */
utils.pkgFilename(btype, 'ipa'), utils.pkgFilename(btype, 'ipa'),

View File

@ -18,7 +18,7 @@ def bundle() {
} }
/* configure build metadata */ /* configure build metadata */
nix.shell( nix.shell(
plutil('CFBundleShortVersionString', utils.getVersion('mobile_files')) + plutil('CFBundleShortVersionString', utils.getVersion()) +
plutil('CFBundleVersion', utils.genBuildNumber()) + plutil('CFBundleVersion', utils.genBuildNumber()) +
plutil('CFBundleBuildUrl', currentBuild.absoluteUrl) plutil('CFBundleBuildUrl', currentBuild.absoluteUrl)
) )

View File

@ -1,11 +1,7 @@
nix = load 'ci/nix.groovy' nix = load 'ci/nix.groovy'
def getVersion(type = null) { def getVersion() {
/* if type is undefined we get VERSION from repo root */
def path = "${env.WORKSPACE}/VERSION" def path = "${env.WORKSPACE}/VERSION"
if (type != null) {
path = "${env.WORKSPACE}/${type}/VERSION"
}
return readFile(path).trim() return readFile(path).trim()
} }

View File

@ -1,3 +0,0 @@
{
"presets": ["module:metro-react-native-babel-preset"]
}

View File

@ -22,7 +22,7 @@ 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 else
RELEASE_VERSION=$(cat ../VERSION) RELEASE_VERSION=$(cat ../../VERSION)
BUILD_NO=$(bash ../scripts/build_no.sh) BUILD_NO=$(bash ../scripts/build_no.sh)
# For debugging: # For debugging:

View File

@ -1 +0,0 @@
0.14.0

View File

@ -185,7 +185,7 @@ function compile() {
function bundleWindows() { function bundleWindows() {
local buildType="$1" local buildType="$1"
local version_file="${STATUSREACTPATH}/desktop_files/VERSION" local version_file="${STATUSREACTPATH}/VERSION"
VERSION=$(cat $version_file) VERSION=$(cat $version_file)
if [ -z "$VERSION" ]; then if [ -z "$VERSION" ]; then
echo "${RED}Could not read version from ${version_file}!${NC}" echo "${RED}Could not read version from ${version_file}!${NC}"

View File

@ -44,20 +44,14 @@ fi
$GIT_ROOT/scripts/run-environment-check.sh $1 $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" echo "Creating link: package.json -> ${PLATFORM_FOLDER}/package.json.orig"
ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json ln -sf ${PLATFORM_FOLDER}/package.json.orig package.json
echo "Creating link: yarn.lock -> ${PLATFORM_FOLDER}/yarn.lock" echo "Creating link: yarn.lock -> ${PLATFORM_FOLDER}/yarn.lock"
ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock ln -sf ${PLATFORM_FOLDER}/yarn.lock yarn.lock
echo "Creating link: VERSION -> ${PLATFORM_FOLDER}/VERSION" echo "Creating link: metro.config.js -> ${PLATFORM_FOLDER}/metro.config.js"
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"
ln -sf ${PLATFORM_FOLDER}/metro.config.js metro.config.js ln -sf ${PLATFORM_FOLDER}/metro.config.js metro.config.js
fi fi