Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix(app): include proper app version
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Sep 18, 2019
1 parent 588d28a commit b110d8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
9 changes: 7 additions & 2 deletions continuous-deployment-device-ui-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ phases:
commands:
- ./cli/index.js react-config >
$CODEBUILD_SRC_DIR_DeviceUI/.env.production.local
- export INITIATOR_PIPELINE_NAME=`echo $CODEBUILD_INITIATOR | cut -d'/'
-f2`
- export SOURCE_VERSION=`aws codepipeline get-pipeline-state --name
$INITIATOR_PIPELINE_NAME | jq -r '.stageStates[0].actionStates[] |
select(.actionName == "DeviceUISourceCode").currentRevision.revisionId'`
- echo REACT_APP_VERSION=`git ls-remote --tags $SOURCE_REPO_URL | grep
$CODEBUILD_RESOLVED_SOURCE_VERSION | cut -d'/' -f3 | cut -d'^' -f1` >>
$CODEBUILD_SRC_DIR_WebApp/.env.production.local
$SOURCE_VERSION | cut -d'/' -f3 | cut -d'^' -f1` >>
$CODEBUILD_SRC_DIR_DeviceUI/.env.production.local
- cat $CODEBUILD_SRC_DIR_DeviceUI/.env.production.local
- export $(cat $CODEBUILD_SRC_DIR_DeviceUI/.env.production.local | xargs)
- cd $CODEBUILD_SRC_DIR_DeviceUI/; npm ci --no-audit; npm run build;
Expand Down
9 changes: 0 additions & 9 deletions continuous-deployment-web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,11 @@ phases:
commands:
- ./cli/index.js react-config >
$CODEBUILD_SRC_DIR_WebApp/.env.production.local
- echo $SOURCE_REPO_URL
- echo $CODEBUILD_INITIATOR
- echo $CODEBUILD_INITIATOR | cut -d'/' -f2
- export INITIATOR_PIPELINE_NAME=`echo $CODEBUILD_INITIATOR | cut -d'/'
-f2`
- echo $INITIATOR_PIPELINE_NAME
- aws codepipeline get-pipeline-state --name $INITIATOR_PIPELINE_NAME |
jq -r '.stageStates[0].actionStates[] | select(.actionName ==
"WebAppSourceCode").currentRevision.revisionId'
- export SOURCE_VERSION=`aws codepipeline get-pipeline-state --name
$INITIATOR_PIPELINE_NAME | jq -r '.stageStates[0].actionStates[] |
select(.actionName == "WebAppSourceCode").currentRevision.revisionId'`
- echo $SOURCE_VERSION
- git ls-remote --tags $SOURCE_REPO_URL
- echo REACT_APP_VERSION=`git ls-remote --tags $SOURCE_REPO_URL | grep
$SOURCE_VERSION | cut -d'/' -f3 | cut -d'^' -f1` >>
$CODEBUILD_SRC_DIR_WebApp/.env.production.local
Expand Down

0 comments on commit b110d8d

Please sign in to comment.