Skip to content

Commit

Permalink
Remove issues with many package.json variation in deployed package
Browse files Browse the repository at this point in the history
  • Loading branch information
avifenesh committed May 27, 2024
1 parent 5939932 commit 06b2ad6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/node-create-package-file/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,15 @@ runs:
# set the registry scope
export registry_scope=`if [ "${{ inputs.npm_scope }}" != '' ]; then echo "${{ inputs.npm_scope }}:"; fi`
# remove the current name section
SED_FOR_MACOS=`if [[ "${{ inputs.os }}" =~ .*"macos".* ]]; then echo "''"; fi`
sed -i $SED_FOR_MACOS '/"name":/d' ./package.json
if [[ "${{ inputs.os }}" =~ .*"macos".* ]]; then
sed '/"name":/d' ./package.json > temp.json && mv temp.json package.json
else
sed -i '/"name":/d' ./package.json
fi
# Remove all `///` occurrences to enable the commented out sections
sed -i -e 's|///||g' package.json
# generate package.json from the template
mv package.json package.json.tmpl
envsubst < package.json.tmpl > "package.json"
cat package.json
echo $(ls *json*)
5 changes: 5 additions & 0 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ jobs:
os: ubuntu
target: "x86_64-unknown-linux-gnu"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Del package.json.tmpl
run: |
rm ./node/npm/glide/package.json.tmpl
echo $(ls *json*)
- name: Check if RC and set a distribution tag for the package
shell: bash
Expand Down

0 comments on commit 06b2ad6

Please sign in to comment.