@@ -85,6 +85,9 @@ main() {
85
85
# Ignore symlink when publishing npm package
86
86
# See: https://github.com/coder/code-server/pull/3935
87
87
echo " node_modules.asar" > release/.npmignore
88
+ # We use this to set the name of the package in the
89
+ # package.json
90
+ PACKAGE_NAME=" code-server"
88
91
89
92
# NOTES:@jsjoeio
90
93
# We only need to run npm version for "development" and "staging".
@@ -112,15 +115,10 @@ main() {
112
115
# Source: https://github.com/actions/checkout/issues/58#issuecomment-614041550
113
116
PR_NUMBER=$( echo " $GITHUB_REF " | awk ' BEGIN { FS = "/" } ; { print $3 }' )
114
117
NPM_VERSION=" $VERSION -$PR_NUMBER -$COMMIT_SHA "
115
- DEV_PACKAGE_NAME =" @coder/code-server-pr"
118
+ PACKAGE_NAME =" @coder/code-server-pr"
116
119
# This means the npm version will be tagged with "<pr number>"
117
120
# and installed when a user runs `yarn install code-server@<pr number>`
118
121
NPM_TAG=" $PR_NUMBER "
119
- # Use the development package name
120
- # This is so we don't clutter the code-server versions on npm
121
- # with development versions.
122
- # NOTE: Requires npm Version 7.x or higher
123
- npm pkg set name=" $DEV_PACKAGE_NAME "
124
122
fi
125
123
126
124
echo " using tag: $NPM_TAG "
@@ -131,9 +129,15 @@ main() {
131
129
# Example: "version": "4.0.1-4769-ad7b23cfe6ffd72914e34781ef7721b129a23040"
132
130
# Example: "version": "4.0.1-beta-ad7b23cfe6ffd72914e34781ef7721b129a23040"
133
131
pushd release
134
- # NOTE: @jsjoeio
132
+ # NOTE@jsjoeio
135
133
# I originally tried to use `yarn version` but ran into issues and abandoned it.
136
134
npm version " $NPM_VERSION "
135
+ # NOTE@jsjoeio
136
+ # Use the development package name
137
+ # This is so we don't clutter the code-server versions on npm
138
+ # with development versions.
139
+ # Requires npm Version 7.x or higher
140
+ npm pkg set name=" $PACKAGE_NAME "
137
141
popd
138
142
fi
139
143
0 commit comments