Skip to content

Commit

Permalink
Use sed instead of jq
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Aug 14, 2024
1 parent 1093391 commit c1e9085
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/deploy-pages-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,15 @@ jobs:
- name: Setup Pages
uses: actions/configure-pages@v4

- name: Install yq
run: sudo apt-get install -y jq python3-pip && pip3 install yq

- name: Extract version from base.yaml
id: extract_version
run: |
VERSION=$(awk '/project:/, /version:/' firmware/base.yaml | grep 'version:' | awk '{print $2}' | sed 's/[",]//g')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
echo "VERSION=${VERSION}-dev" >> $GITHUB_ENV
- name: Update package.json version
run: |
jq --arg version "$VERSION" '.version = $version' package.json > temp.json
mv temp.json package.json
sed -i "s/\"version\": \".*\"/\"version\": \"${VERSION}\"/" package.json
- name: Install dependencies
run: npm ci
Expand Down

0 comments on commit c1e9085

Please sign in to comment.