summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-06-26 15:24:23 -0700
committerStan Hu <stanhu@gmail.com>2018-06-26 15:24:23 -0700
commita5ca56eeeddc3cc1f1e92608b8b67e917d86837e (patch)
tree1604662b67066b2edd25be0d7bcd7ded75069aed /scripts
parentd7c79839d3e993c8166907fbe277752115897fee (diff)
parent292cf668905a55e7b305c67b314cb039d2681a54 (diff)
downloadgitlab-ce-a5ca56eeeddc3cc1f1e92608b8b67e917d86837e.tar.gz
Merge branch 'master' into sh-support-bitbucket-server-import
Diffstat (limited to 'scripts')
-rw-r--r--scripts/frontend/postinstall.js22
-rwxr-xr-xscripts/trigger-build-docs2
2 files changed, 23 insertions, 1 deletions
diff --git a/scripts/frontend/postinstall.js b/scripts/frontend/postinstall.js
new file mode 100644
index 00000000000..682039a41b3
--- /dev/null
+++ b/scripts/frontend/postinstall.js
@@ -0,0 +1,22 @@
+const chalk = require('chalk');
+
+// check that fsevents is available if we're on macOS
+if (process.platform === 'darwin') {
+ try {
+ require.resolve('fsevents');
+ } catch (e) {
+ console.error(`${chalk.red('error')} Dependency postinstall check failed.`);
+ console.error(
+ chalk.red(`
+ The fsevents driver is not installed properly.
+ If you are running a new version of Node, please
+ ensure that it is supported by the fsevents library.
+
+ You can try installing again with \`${chalk.cyan('yarn install --force')}\`
+ `)
+ );
+ process.exit(1);
+ }
+}
+
+console.log(`${chalk.green('success')} Dependency postinstall check passed.`);
diff --git a/scripts/trigger-build-docs b/scripts/trigger-build-docs
index c9aaba91aa0..2a0e7f4d76e 100755
--- a/scripts/trigger-build-docs
+++ b/scripts/trigger-build-docs
@@ -27,7 +27,7 @@ def docs_branch
# Prefix the remote branch with the slug of the project in order
# to avoid name conflicts in the rare case the branch name already
# exists in the docs repo and truncate to max length.
- "#{slug}-#{ENV["CI_COMMIT_REF_SLUG"]}"[0...max]
+ "#{slug}-#{ENV["CI_ENVIRONMENT_SLUG"]}"[0...max]
end
#