From 12ab61e5e21684f68a12a59bebd1070f8deaaf65 Mon Sep 17 00:00:00 2001 From: yazninja Date: Sat, 21 May 2022 13:54:31 +0800 Subject: [PATCH] text v2 --- .circleci/config.yml | 4 ++-- resources/circle.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8dbf8e2..a3625a1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -160,8 +160,8 @@ jobs: name: Fix Versioning and Add Channel command: yarn circle:script - run: - name: Show Environment Variable APP_VERSION - command: echo $APP_VERSION + name: Set App Version + command: echo "export APP_VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1)" >> $BASH_ENV - run: name: Publish Release command: | diff --git a/resources/circle.js b/resources/circle.js index 38568bf4..199b32c6 100644 --- a/resources/circle.js +++ b/resources/circle.js @@ -34,13 +34,13 @@ pkg.publish = { const {exec} = require('child_process') -exec(`echo "export APP_VERSION=${pkg.version}" >> $BASH_ENV && echo $APP_VERSION`, {env: {'APP_VERSION': pkg.version}}, function (error, stdout, stderr) { +exec(`echo $APP_VERSION`, {env: {'APP_VERSION': pkg.version}}, function (error, stdout, stderr) { console.log(stdout, stderr, error); }); writeFile('package.json', JSON.stringify(pkg), err => { // error checking if (err) throw err; - console.log(`VERSION CHANGED TO ${pkg.version}`); + console.log(`VERSION CHANGED TO ${pkg.version}`, pkg); });