Skip to content

Commit

Permalink
optimizations and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xrip committed Oct 12, 2023
1 parent 311d721 commit 2ea0491
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/build-release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
# pull_request:
# branches: [ master ]


# Must match the project() name in CMakeLists.txt
env:
APP_NAME: genesis
Expand Down Expand Up @@ -38,28 +37,30 @@ jobs:
- name: Print Working directory
run: echo $HOME && pwd && ls -la

- name: Update line containing pico_set_program_version() in CMakelists.txt with tag name.
run: |
# Extract the tag name that triggered the event and remove the 'refs/tags/' prefix
input_string=${{ github.ref }}
prefix="refs/tags/"
tag="No versioninfo found"
if [[ $input_string == $prefix* ]]; then
echo "The string starts with 'refs/tags/'."
tag="${input_string#$prefix}"
echo "Tag is ${tag}"
sed -i "s/^[[:space:]]*pico_set_program_version(.*/pico_set_program_version(${{ env.APP_NAME }} \"$tag\")/" CMakeLists.txt
else
echo "The string does not start with 'refs/tags/'."
fi
grep "pico_set_program_version" CMakeLists.txt
- name: Install Pico SDk
run: |
cd $HOME && \
git clone --depth 1 https://github.com/raspberrypi/pico-sdk.git --branch master && \
cd pico-sdk/ && \
git submodule update --init
- name: Update line containing pico_set_program_version() in CMakelists.txt with tag name.
run: |
# Extract the tag name that triggered the event and remove the 'refs/tags/' prefix
input_string=${{ github.ref }}
prefix="refs/tags/"
tag="No versioninfo found"
if [[ $input_string == $prefix* ]]; then
echo "The string starts with 'refs/tags/'."
tag="${input_string#$prefix}"
echo "Tag is ${tag}"
sed -i "s/^[[:space:]]*pico_set_program_version(.*/pico_set_program_version(${{ env.APP_NAME }} \"$tag\")/" CMakeLists.txt
else
echo "The string does not start with 'refs/tags/'."
fi
grep "pico_set_program_version" CMakeLists.txt
- name: Build the basic version
run: |
Expand Down

0 comments on commit 2ea0491

Please sign in to comment.