version to env
This commit is contained in:
parent
cbdaf943a1
commit
c5134162f7
1 changed files with 5 additions and 1 deletions
|
@ -13,7 +13,11 @@ pvers = package.version.match(/\d+\./g)
|
|||
|
||||
// https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables
|
||||
package.version = `${pvers[0]}${pvers[1]}${process.env['CIRCLE_BUILD_NUM']}`
|
||||
exec(`export APP_VERSION=${package.version}`)
|
||||
|
||||
exec('echo $APP_VERSION', {env: {'APP_VERSION': package.version}}, function (error, stdout, stderr)
|
||||
{
|
||||
console.log(stdout, stderr, error);
|
||||
});
|
||||
|
||||
fs.writeFile('package.json', JSON.stringify(package), err => {
|
||||
// error checking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue