Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
8823a304
Unverified
Commit
8823a304
authored
Oct 25, 2018
by
Robert Knight
Committed by
GitHub
Oct 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #795 from hypothesis/wait-for-npm-release
Wait for npm release to complete before deploying to CDN
parents
8c9c51fe
5fbaa02f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
Jenkinsfile
Jenkinsfile
+1
-0
wait-for-npm-release.sh
scripts/wait-for-npm-release.sh
+18
-0
No files found.
Jenkinsfile
View file @
8823a304
...
@@ -112,6 +112,7 @@ node {
...
@@ -112,6 +112,7 @@ node {
// See https://github.com/yarnpkg/yarn/pull/3391.
// See https://github.com/yarnpkg/yarn/pull/3391.
sh
"echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh
"echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh
"npm publish --tag ${npmTag}"
sh
"npm publish --tag ${npmTag}"
sh
"scripts/wait-for-npm-release.sh"
}
}
}
}
...
...
scripts/wait-for-npm-release.sh
0 → 100755
View file @
8823a304
#!/bin/sh
# Wait for the version of the package available on npm to match the
# version in package.json.
#
# This script is needed because a new release of a package is not always
# immediately available after "npm publish" returns.
expected_version
=
$(
node
-p
"require('./package.json').version"
)
while
[
true
]
do
released_version
=
$(
npm show hypothesis dist-tags.latest
)
if
[
$released_version
=
$expected_version
]
;
then
break
fi
sleep
1
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment