From e71e45c8dba9dba26d4ac0dc1254cec475b8f576 Mon Sep 17 00:00:00 2001 From: Tom Underhill Date: Wed, 29 Jan 2020 17:23:32 -0800 Subject: [PATCH 1/2] Add postInstall step to restore the executable bit on scripts. --- .../scripts/run-android-docker-instrumentation-tests.sh | 0 .../Dockerfiles/scripts/run-android-docker-unit-tests.sh | 0 Folly/build/fbcode_builder/docker_build_with_ccache.sh | 0 Folly/build/fbcode_builder/travis_docker_build.sh | 0 Folly/folly/build/bootstrap-osx-homebrew.sh | 0 Folly/folly/build/build_debs_ubuntu_14.04.sh | 0 Folly/folly/build/deps_ubuntu_12.04.sh | 0 .../experimental/symbolizer/test/gnu_debuglink_test.sh | 0 glog/ltmain.sh | 0 glog/packages/deb.sh | 0 glog/packages/rpm.sh | 0 glog/src/demangle_unittest.sh | 0 glog/src/logging_striplog_test.sh | 0 glog/src/signalhandler_unittest.sh | 0 glog/src/windows/preprocess.sh | 0 package.json | 3 ++- scripts/clone-sdxplatform.sh | 0 scripts/fixmacscripts.sh | 9 +++++++++ scripts/generate-rncore.sh | 0 scripts/logging.sh | 0 scripts/node-binary.sh | 0 scripts/postInstall.js | 6 ++++++ scripts/vsto-test-ci.sh | 0 scripts/vsto-test-cleanup.sh | 0 scripts/vsto-test-setup.sh | 0 25 files changed, 17 insertions(+), 1 deletion(-) mode change 100644 => 100755 .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh mode change 100644 => 100755 .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh mode change 100644 => 100755 Folly/build/fbcode_builder/docker_build_with_ccache.sh mode change 100644 => 100755 Folly/build/fbcode_builder/travis_docker_build.sh mode change 100644 => 100755 Folly/folly/build/bootstrap-osx-homebrew.sh mode change 100644 => 100755 Folly/folly/build/build_debs_ubuntu_14.04.sh mode change 100644 => 100755 Folly/folly/build/deps_ubuntu_12.04.sh mode change 100644 => 100755 Folly/folly/experimental/symbolizer/test/gnu_debuglink_test.sh mode change 100644 => 100755 glog/ltmain.sh mode change 100644 => 100755 glog/packages/deb.sh mode change 100644 => 100755 glog/packages/rpm.sh mode change 100644 => 100755 glog/src/demangle_unittest.sh mode change 100644 => 100755 glog/src/logging_striplog_test.sh mode change 100644 => 100755 glog/src/signalhandler_unittest.sh mode change 100644 => 100755 glog/src/windows/preprocess.sh mode change 100644 => 100755 scripts/clone-sdxplatform.sh create mode 100755 scripts/fixmacscripts.sh mode change 100644 => 100755 scripts/generate-rncore.sh mode change 100644 => 100755 scripts/logging.sh mode change 100644 => 100755 scripts/node-binary.sh create mode 100644 scripts/postInstall.js mode change 100644 => 100755 scripts/vsto-test-ci.sh mode change 100644 => 100755 scripts/vsto-test-cleanup.sh mode change 100644 => 100755 scripts/vsto-test-setup.sh diff --git a/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh b/.circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh old mode 100644 new mode 100755 diff --git a/.circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh b/.circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh old mode 100644 new mode 100755 diff --git a/Folly/build/fbcode_builder/docker_build_with_ccache.sh b/Folly/build/fbcode_builder/docker_build_with_ccache.sh old mode 100644 new mode 100755 diff --git a/Folly/build/fbcode_builder/travis_docker_build.sh b/Folly/build/fbcode_builder/travis_docker_build.sh old mode 100644 new mode 100755 diff --git a/Folly/folly/build/bootstrap-osx-homebrew.sh b/Folly/folly/build/bootstrap-osx-homebrew.sh old mode 100644 new mode 100755 diff --git a/Folly/folly/build/build_debs_ubuntu_14.04.sh b/Folly/folly/build/build_debs_ubuntu_14.04.sh old mode 100644 new mode 100755 diff --git a/Folly/folly/build/deps_ubuntu_12.04.sh b/Folly/folly/build/deps_ubuntu_12.04.sh old mode 100644 new mode 100755 diff --git a/Folly/folly/experimental/symbolizer/test/gnu_debuglink_test.sh b/Folly/folly/experimental/symbolizer/test/gnu_debuglink_test.sh old mode 100644 new mode 100755 diff --git a/glog/ltmain.sh b/glog/ltmain.sh old mode 100644 new mode 100755 diff --git a/glog/packages/deb.sh b/glog/packages/deb.sh old mode 100644 new mode 100755 diff --git a/glog/packages/rpm.sh b/glog/packages/rpm.sh old mode 100644 new mode 100755 diff --git a/glog/src/demangle_unittest.sh b/glog/src/demangle_unittest.sh old mode 100644 new mode 100755 diff --git a/glog/src/logging_striplog_test.sh b/glog/src/logging_striplog_test.sh old mode 100644 new mode 100755 diff --git a/glog/src/signalhandler_unittest.sh b/glog/src/signalhandler_unittest.sh old mode 100644 new mode 100755 diff --git a/glog/src/windows/preprocess.sh b/glog/src/windows/preprocess.sh old mode 100644 new mode 100755 diff --git a/package.json b/package.json index adedcec7c9cc80..c350ed9df89fa0 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,8 @@ "test-android-unit": "yarn run docker-build-android && yarn run test-android-run-unit", "test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e", "build-ios-e2e": "detox build -c ios.sim.release", - "test-ios-e2e": "detox test -c ios.sim.release RNTester/e2e" + "test-ios-e2e": "detox test -c ios.sim.release RNTester/e2e", + "postinstall": "node scripts/postInstall.js", }, "peerDependencies": { "react": "16.8.6" diff --git a/scripts/clone-sdxplatform.sh b/scripts/clone-sdxplatform.sh old mode 100644 new mode 100755 diff --git a/scripts/fixmacscripts.sh b/scripts/fixmacscripts.sh new file mode 100755 index 00000000000000..419d957530bacd --- /dev/null +++ b/scripts/fixmacscripts.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# npm publish is currently performed on Windows build agents and loses the executable bit on files. +# restore the executable bit during npm postinstall + +echo "Fixing the executable bit on macOS scripts" + +find . -iname \*.sh -exec chmod +x {} \; +find . -iname \*.command -exec chmod +x {} \; diff --git a/scripts/generate-rncore.sh b/scripts/generate-rncore.sh old mode 100644 new mode 100755 diff --git a/scripts/logging.sh b/scripts/logging.sh old mode 100644 new mode 100755 diff --git a/scripts/node-binary.sh b/scripts/node-binary.sh old mode 100644 new mode 100755 diff --git a/scripts/postInstall.js b/scripts/postInstall.js new file mode 100644 index 00000000000000..b039717770dd24 --- /dev/null +++ b/scripts/postInstall.js @@ -0,0 +1,6 @@ +const child_process = require('child_process'); + +const isMacOS = process.platform === 'darwin'; +if (isMacOS) { + child_process.execSync('source scripts/fixmacscripts.sh', {stdio: 'inherit'}); +} diff --git a/scripts/vsto-test-ci.sh b/scripts/vsto-test-ci.sh old mode 100644 new mode 100755 diff --git a/scripts/vsto-test-cleanup.sh b/scripts/vsto-test-cleanup.sh old mode 100644 new mode 100755 diff --git a/scripts/vsto-test-setup.sh b/scripts/vsto-test-setup.sh old mode 100644 new mode 100755 From 5872d420d7b44cd23978f8d2893fcfefbfc1d8c3 Mon Sep 17 00:00:00 2001 From: Tom Underhill Date: Wed, 29 Jan 2020 17:33:38 -0800 Subject: [PATCH 2/2] Removed comma --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c350ed9df89fa0..fb75d28f86f684 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e", "build-ios-e2e": "detox build -c ios.sim.release", "test-ios-e2e": "detox test -c ios.sim.release RNTester/e2e", - "postinstall": "node scripts/postInstall.js", + "postinstall": "node scripts/postInstall.js" }, "peerDependencies": { "react": "16.8.6"