Skip to content

Commit

Permalink
better way to grab version
Browse files Browse the repository at this point in the history
  • Loading branch information
vslavik committed Nov 1, 2023
1 parent f7472b0 commit 424e312
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build-ota-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true

- name: Install GNU gettext
run: sudo apt-get install gettext
Expand All @@ -25,7 +23,6 @@ jobs:

- name: Upload OTA updates
run: |
git fetch --tags
VERSION=$(git describe --tags --match 'v*' | sed -e 's/v\([0-9]\+\)\.\([0-9]\+\).*/\1.\2/g')
echo "ota version: $VERSION"
curl -F 'data=@ota-update.tar' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"
VERSION=$(sed -n -e 's/.*POEDIT_VERSION.* "\([0-9]*\)\.\([0-9]*\).*".*/\1.\2/p' src/version.h)
echo "OTA version: $VERSION"
curl --fail-with-body -F 'data=@ota-update.tar' -H "X-Api-Key: ${{secrets.OTA_API_KEY}}" "${{secrets.OTA_UPLOAD_ENDPOINT}}?version=${VERSION}"

0 comments on commit 424e312

Please sign in to comment.