allow tag to be set with args

This commit is contained in:
Jiiks 2019-02-20 16:10:18 +02:00
parent 7bc4b652fa
commit e6c9bc447e
1 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,5 @@
const args = process.argv;
const tag = args.length > 2 ? args[2] : ':rel';
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
const archiver = require('archiver'); const archiver = require('archiver');
@ -5,6 +7,11 @@ const hashfiles = require('hash-files');
const releaseStub = require('./releasestub.json'); const releaseStub = require('./releasestub.json');
releaseStub.files = releaseStub.files.map(file => {
file.remote = file.remote.replace(':rel', tag);
return file;
});
const mainpkg = require('../package.json'); const mainpkg = require('../package.json');
const corepkg = require('../release/core/package.json'); const corepkg = require('../release/core/package.json');
const clientpkg = require('../release/client/package.json'); const clientpkg = require('../release/client/package.json');