Archived
1
0

feat: Add a shrinkwrap file to the NPM release (#5010)

This commit is contained in:
Edouard Vincent
2022-03-29 10:33:56 -07:00
committed by GitHub
parent e1c1ba8b36
commit 326a1d1862
10 changed files with 204 additions and 58 deletions

View File

@ -59,11 +59,11 @@ main() {
# This string is used to determine how we should tag the npm release.
# Environment can be one of three choices:
# "development" - this means we tag with the PR number, allowing
# a developer to install this version with `yarn add code-server@<pr-number>`
# a developer to install this version with `npm install code-server@<pr-number>`
# "staging" - this means we tag with `beta`, allowing
# a developer to install this version with `yarn add code-server@beta`
# a developer to install this version with `npm install code-server@beta`
# "production" - this means we tag with `latest` (default), allowing
# a developer to install this version with `yarn add code-server@latest`
# a developer to install this version with `npm install code-server@latest`
if ! is_env_var_set "NPM_ENVIRONMENT"; then
echo "NPM_ENVIRONMENT is not set. Determining in script based on GITHUB environment variables."
@ -96,7 +96,7 @@ main() {
if [[ "$NPM_ENVIRONMENT" == "production" ]]; then
NPM_VERSION="$VERSION"
# This means the npm version will be published as "stable"
# and installed when a user runs `yarn install code-server`
# and installed when a user runs `npm install code-server`
NPM_TAG="latest"
else
COMMIT_SHA="$GITHUB_SHA"
@ -107,7 +107,7 @@ main() {
if [[ "$NPM_ENVIRONMENT" == "staging" ]]; then
NPM_VERSION="$VERSION-beta-$COMMIT_SHA"
# This means the npm version will be tagged with "beta"
# and installed when a user runs `yarn install code-server@beta`
# and installed when a user runs `npm install code-server@beta`
NPM_TAG="beta"
fi
@ -117,7 +117,7 @@ main() {
NPM_VERSION="$VERSION-$PR_NUMBER-$COMMIT_SHA"
PACKAGE_NAME="@coder/code-server-pr"
# This means the npm version will be tagged with "<pr number>"
# and installed when a user runs `yarn install code-server@<pr number>`
# and installed when a user runs `npm install code-server@<pr number>`
NPM_TAG="$PR_NUMBER"
fi