Skip to content

Commit

Permalink
Merge branch 'new_deployment' into insight
Browse files Browse the repository at this point in the history
  • Loading branch information
dvvanessastoiber authored Aug 1, 2023
2 parents 000bd3e + b3eab64 commit 0ef80d6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build-workspace-product-part.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,28 @@ jobs:
GH_TOKEN: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
GITLAB_HOST: ${{ secrets.GITLAB_HOST }}
- name: Inject version from product package.json into workspace package.json
run: |
product_version=$(jq -rc '.version' ./package.json)
echo "product_version=$product_version"
if [[ $product_version == *"SNAPSHOT"* ]]; then
echo "replace SNAPSHOT in version with timestamp"
product_version=$(echo "$product_version" | sed "s/SNAPSHOT/$(date +%Y%m%d-%H%M%S)/g")
echo "product_version=$product_version"
fi
workspace_version=$(jq -rc '.version' ./tmp/$COMPONENT/package.json)
echo "workspace_version=$workspace_version"
if [[ $product_version != $workspace_version ]]; then
echo "update workspace version"
jq --arg version "$product_version" '.version = $version' ./tmp/$COMPONENT/package.json > ./tmp/$COMPONENT/package.json.tmp
mv ./tmp/$COMPONENT/package.json.tmp ./tmp/$COMPONENT/package.json
echo "workspace version updated to $(jq -rc '.version' ./tmp/$COMPONENT/package.json)"
fi
env:
COMPONENT: ${{ inputs.component }}
- name: Copy docker sources
run: |
ls -lah .
Expand Down

0 comments on commit 0ef80d6

Please sign in to comment.