Skip to content

Commit c360c19

Browse files
committed
Manualy set tmp dir for Node on JitPack
1 parent 08fefca commit c360c19

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

jitpack.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ before_install:
22
- yes | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-27"
33
- yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;27.0.3"
44
install:
5+
- export TMPDIR=`dirname $(mktemp)`
56
- echo "Changing into the android folder of the Bridge module"
67
- pushd react-native-gutenberg-bridge/android && ./gradlew --stacktrace clean -Pgroup=com.github.wordpress-mobile.gutenberg-mobile -Pversion=$VERSION install && popd
78
- pushd react-native-aztec/android && ./gradlew --stacktrace clean -Pgroup=com.github.wordpress-mobile.gutenberg-mobile -Pversion=$VERSION install && popd

react-native-gutenberg-bridge/android/build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,16 @@ if (isJitPack) {
4949
// If false, it will try to use globally installed node.
5050
download = true
5151

52+
def tmpdir = "${System.getenv('TMPDIR')}/jsbundle/${System.getenv('VERSION')}"
53+
5254
// Set the work directory for unpacking node
53-
workDir = file("${project.buildDir}/jsbundle/nodejs")
55+
workDir = file("${tmpdir}/nodejs")
5456

5557
// Set the work directory for NPM
56-
npmWorkDir = file("${project.buildDir}/jsbundle/npm")
58+
npmWorkDir = file("${tmpdir}/npm")
5759

5860
// Set the work directory for Yarn
59-
yarnWorkDir = file("${project.buildDir}/jsbundle/yarn")
61+
yarnWorkDir = file("${tmpdir}/yarn")
6062

6163
// Set the work directory where node_modules should be located
6264
nodeModulesDir = file("${project.projectDir}/../../")

0 commit comments

Comments
 (0)