Skip to content

Commit

Permalink
ci: Use node to set npm version (will be reused with electron-packager)
Browse files Browse the repository at this point in the history
  • Loading branch information
manusa committed Feb 1, 2020
1 parent ac4e772 commit b787590
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/version-from-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

const childProcess = require('child_process');
const errorHandler = require('./error-handler');
const refPrefix = 'refs\\/tags\\/v';
const refPrefix = 'refs/tags/v';

const extractVersionFromTag = () => {
console.log(process.env);
const githubRef = process.env.GITHUB_REF;
if (githubRef && githubRef.startsWith('refs\\/tags\\/v')) {
if (githubRef && githubRef.startsWith(refPrefix)) {
console.log(`replaced stuff ${githubRef.replace(refPrefix, '')}`);
return githubRef.replace(refPrefix, '');
}
return null;
Expand Down

0 comments on commit b787590

Please sign in to comment.