Fix xgo creating files as `root` (#1210)

This commit is contained in:
Pedro Pombeiro 2018-09-24 22:21:13 +02:00 committed by GitHub
parent dcaf8caed0
commit 6a1cd7f2b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 4 deletions

2
.gitignore vendored
View File

@ -36,7 +36,7 @@ tags
# used by the Makefile # used by the Makefile
/build/_workspace/ /build/_workspace/
/build/bin/ /build/bin/
/vendor/github.com/karalabe/xgo /vendor/github.com/status-im/xgo
# travis # travis
profile.tmp profile.tmp

View File

@ -195,7 +195,8 @@ xgo-docker-images: ##@docker Build xgo docker images
xgo: xgo:
docker pull $(XGOIMAGE) docker pull $(XGOIMAGE)
go get github.com/karalabe/xgo go get github.com/status-im/xgo
mkdir -p $(GOBIN)
install-os-dependencies: install-os-dependencies:
_assets/scripts/install_deps.sh _assets/scripts/install_deps.sh

View File

@ -1,5 +1,7 @@
FROM karalabe/xgo-1.10.x FROM karalabe/xgo-1.10.x
VOLUME [ "/build", "/deps-cache" ]
# Inject the container entry point, the build script (patched for Status bindings conditional builds of C code) # Inject the container entry point, the build script (patched for Status bindings conditional builds of C code)
ADD build.sh /build.sh ADD build.sh /build.sh
ENV BUILD /build.sh ENV BUILD /build.sh

View File

@ -298,6 +298,9 @@ for TARGET in $TARGETS; do
(cd $archive && zip -r $bundle *) (cd $archive && zip -r $bundle *)
rm -rf $jni $archive rm -rf $jni $archive
fi fi
# Fix up permissions on bundle file
chown $UID:$GID $bundle
fi fi
# Clean up the android builds, toolchains and runtimes # Clean up the android builds, toolchains and runtimes
rm -rf /build-android-aar rm -rf /build-android-aar
@ -583,6 +586,8 @@ for TARGET in $TARGETS; do
echo -e "framework module \"$title\" {\n header \"$title.h\"\n export *\n}" > $framework/Versions/A/Modules/module.modulemap echo -e "framework module \"$title\" {\n header \"$title.h\"\n export *\n}" > $framework/Versions/A/Modules/module.modulemap
(cd $framework && ln -nsf Versions/A/Modules Modules) (cd $framework && ln -nsf Versions/A/Modules Modules)
# Fix up permissions on bundle file
chown $UID:$GID /build/$NAME-ios-$PLATFORM-framework
chmod 777 -R /build/$NAME-ios-$PLATFORM-framework chmod 777 -R /build/$NAME-ios-$PLATFORM-framework
fi fi
rm -rf /build-ios-fw rm -rf /build-ios-fw

View File

@ -36,7 +36,7 @@ node('linux') {
// } // }
stage('Build') { stage('Build') {
sh 'go get github.com/karalabe/xgo' sh 'go get github.com/status-im/xgo'
parallel ( parallel (
'statusgo-android': { 'statusgo-android': {

View File

@ -49,7 +49,7 @@ node('linux') {
} }
stage('Build') { stage('Build') {
sh 'go get github.com/karalabe/xgo' sh 'go get github.com/status-im/xgo'
parallel ( parallel (
'statusgo-android': { 'statusgo-android': {