Browse Source

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

tags/pre-yarn2nix-push
Pedro Pombeiro 2 months ago
parent
commit
ab11a67c96
No account linked to committer's email address

mobile_files/.babelrc → .babelrc View File


+ 0
- 2
.gitignore 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

desktop_files/VERSION → VERSION View File


+ 1
- 1
ci/android.groovy 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([

+ 1
- 1
ci/github.groovy 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'),

+ 1
- 1
ci/ios.groovy 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)
)

+ 1
- 5
ci/utils.groovy 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()
}


+ 0
- 3
desktop_files/.babelrc View File

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

+ 1
- 1
ios/scripts/set_xcode_version.sh 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:

+ 0
- 1
mobile_files/VERSION View File

@@ -1 +0,0 @@
0.14.0

+ 1
- 1
scripts/build-desktop.sh 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}"

+ 2
- 8
scripts/prepare-for-platform.sh 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


Loading…
Cancel
Save