Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4428dd0

Browse files
committed
chore(ci): correctly compute the DIST_TAG environment variable
Previously, the `DIST_TAG` environment variable was failing to be computed correctly, because it was using the non-existent `jq` tool. In the past (when running on TravisCI), `jq` used to be available, but it is not on the currently used CircleCI docker image, resulting in the following error: ```sh ./.circleci/env.sh: line 59: jq: command not found DIST_TAG= ``` You can see an example failure in the "Set up environment" step logs in https://app.circleci.com/pipelines/github/angular/angular.js/ 166/workflows/34c692ec-18d4-4422-a1cf-108a91219fa5/jobs/1742 This commit fixes it by using `node` (which _is_ available on the docker image) to compute `$DIST_TAG`.
1 parent a6a6c16 commit 4428dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.circleci/env.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ setPublicVar SAUCE_READY_FILE_TIMEOUT 120
5656
####################################################################################################
5757
# Define additional environment variables
5858
####################################################################################################
59-
setPublicVar DIST_TAG $( jq ".distTag" "package.json" | tr -d "\"[:space:]" )
59+
setPublicVar DIST_TAG $( node --print "require('./package.json').distTag" )
6060

6161
####################################################################################################
6262
####################################################################################################
6363
## Source `$BASH_ENV` to make the variables available immediately. ##
64-
## ***NOTE: This must remain the the last action in this script*** ##
64+
## *** NOTE: This must remain the last command in this script. *** ##
6565
####################################################################################################
6666
####################################################################################################
6767
source $BASH_ENV;

0 commit comments

Comments
 (0)