Skip to content

Commit

Permalink
Make snapshot building workflow file more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgecrw committed Jun 29, 2023
1 parent 37da31a commit ea643a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

- name: Get source code version number
id: gitversion
run: echo "version=$(grep -o "versionString = .*;" src/main/java/com/fazecast/jSerialComm/SerialPort.java | grep -o "\".*\"" | grep -o [^\"].*[^\"])" >> $GITHUB_OUTPUT
run: echo "version=$(grep -o "versionString = [^, ;]*" src/main/java/com/fazecast/jSerialComm/SerialPort.java | grep -o "\".*\"" | grep -o [^\"].*[^\"])" >> $GITHUB_OUTPUT

- name: Update library version string
run: sed -i "s/versionString = .*;/versionString = \"${{ steps.gitversion.outputs.version }}-${{ steps.gitsha.outputs.sha }}-SNAPSHOT\";/g" src/main/java/com/fazecast/jSerialComm/SerialPort.java
run: sed -i "s/versionString = [^, ;]*/versionString = \"${{ steps.gitversion.outputs.version }}-${{ steps.gitsha.outputs.sha }}-SNAPSHOT\"/g" src/main/java/com/fazecast/jSerialComm/SerialPort.java

- name: Build native libraries using Docker toolchain
uses: addnab/docker-run-action@v3
Expand Down

0 comments on commit ea643a0

Please sign in to comment.