Skip to content

Commit

Permalink
Fix the regex syntax for $OLD_VERSION and save $FUTURE_VERSION fo…
Browse files Browse the repository at this point in the history
…r later use.
  • Loading branch information
bcoconni committed Jul 13, 2024
1 parent 57cc4d2 commit e5192df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/cpp-python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ jobs:
run: ctest -R fpectl --build-config RelWithDebInfo -V
- name: Test JSBSim
working-directory: build
run: ctest -- parallel $Env:NUMBER_OF_PROCESSORS --build-config RelWithDebInfo --output-on-failure
run: ctest --parallel $Env:NUMBER_OF_PROCESSORS --build-config RelWithDebInfo --output-on-failure

# On failure, upload logs
- name: On failure - Upload logs
Expand Down Expand Up @@ -843,8 +843,9 @@ jobs:
# Extract from CMake the project version number at the next release.
echo "message(STATUS \"JSBSIM_VERSION:\${PROJECT_VERSION}\")" >> src/CMakeLists.txt
export FUTURE_VERSION=`cmake . | grep JSBSIM_VERSION | awk -F':' '{print $2}'`
echo "FUTURE_VERSION=$FUTURE_VERSION" >> $GITHUB_ENV
# Extract the project old version number
export OLD_VERSION=`egrep 'JSBSim-([0-9]+\.)+[0-9]+-setup.exe' README.md | awk -F'JSBSim-' '{ print $2}' | awk -F'-setup.exe' '{ print $1}'`
export OLD_VERSION=`egrep 'JSBSim-([0-9]+\.)+[0-9]+-setup.exe' README.md | awk -F'JSBSim-' '{ print $2}' | awk -F'-setup.exe' '{ print $1}' | sed 's/\./\\\\./g'`
echo "OLD_VERSION=$OLD_VERSION" >> $GITHUB_ENV
# Update references to the current stable version in README.md
sed -ri 's/_'"$OLD_VERSION"'-[0-9]+.amd64.deb/_'"$VERSION"'-'"$GITHUB_RUN_NUMBER"'.amd64.deb/g' README.md
Expand Down

0 comments on commit e5192df

Please sign in to comment.