Skip to content

Commit

Permalink
ci(drone): create buildProperties.json
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingfishflash committed May 11, 2023
1 parent 76a245b commit a9985ae
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ steps:
commands:
- export VERSION=.version
- export NYX_VERSION=$(cat .version)
- export SCM_COMMIT_SHORT_SHA=$(echo $DRONE_COMMIT_SHA | cut -c1-8)
- echo $SCM_COMMIT_SHORT_SHA
# define alt location for npm cache
- export CLIENT_NPM_CACHE=/drone/drone_cache/$DRONE_REPO/client/npm
- echo $CLIENT_NPM_CACHE
Expand All @@ -81,6 +83,21 @@ steps:
- mkdir -pv $CLIENT_DIST
- export PATH=/drone/src/frontend/node_modules/.bin:$PATH
- cd /drone/src/frontend
- |
export JSON_BUILD_PROPERTIES=$(node -pe "
JSON.stringify({
artifact: new String('ledger'),
ciPipelineId: process.env.DRONE_BUILD_NUMBER,
ciPlatform: new String('drone'),
commit: process.env.SCM_COMMIT_SHORT_SHA,
group: Symbol(''),
name: Symbol(''),
time: Symbol(''),
version: process.env.NYX_VERSION
});
")
- echo $JSON_BUILD_PROPERTIES > src/assets/buildProperties.json
- cat src/assets/buildProperties.json
- npm version $NYX_VERSION --no-git-tag-version
- npm ci --cache $CLIENT_NPM_CACHE --prefer-offline
- ng version
Expand Down

0 comments on commit a9985ae

Please sign in to comment.