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/
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

View File

@ -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([

View File

@ -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'),

View File

@ -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)
)

View File

@ -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()
}

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
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:

View File

@ -1 +0,0 @@
0.14.0

View File

@ -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}"

View File

@ -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