File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/bundler-plugin-core/src Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -194,17 +194,20 @@ export function stringToUUID(str: string): string {
194194 ) . toLowerCase ( ) ;
195195}
196196
197- /**
198- * Tries to guess a release name based on environmental data.
199- */
200- export function determineReleaseName ( ) : string | undefined {
197+ function gitRevision ( ) : string | undefined {
201198 let gitRevision : string | undefined ;
202199 try {
203200 gitRevision = childProcess . execSync ( "git rev-parse HEAD" ) . toString ( ) . trim ( ) ;
204201 } catch ( e ) {
205202 // noop
206203 }
204+ return gitRevision ;
205+ }
207206
207+ /**
208+ * Tries to guess a release name based on environmental data.
209+ */
210+ export function determineReleaseName ( ) : string | undefined {
208211 return (
209212 // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables
210213 process . env [ "GITHUB_SHA" ] ||
@@ -225,7 +228,7 @@ export function determineReleaseName(): string | undefined {
225228 process . env [ "ZEIT_GITHUB_COMMIT_SHA" ] ||
226229 process . env [ "ZEIT_GITLAB_COMMIT_SHA" ] ||
227230 process . env [ "ZEIT_BITBUCKET_COMMIT_SHA" ] ||
228- gitRevision
231+ gitRevision ( )
229232 ) ;
230233}
231234
You can’t perform that action at this time.
0 commit comments