@@ -659,6 +659,7 @@ jobs:
659659 find . -type f -name *.whl -exec cp {} dist/. \;
660660 find . -type f -name *.deb -exec cp {} dist/. \;
661661 find . -type f -name *.tar.gz -exec cp {} dist/. \;
662+ find . -type f -name MSVC_version.txt -exec cp {} . \;
662663
663664 # PyPI deployment
664665 - name : Set up Python 3.7
@@ -718,14 +719,18 @@ jobs:
718719 run : |
719720 # Increment the value of PROJECT_VERSION_PATCH
720721 sed -ri 's/(set\(PROJECT_VERSION_PATCH\s\")([0-9]+)(.*)/echo "\1\\"$((\2+1))\\"\3"/ge' CMakeLists.txt
722+ # Extract from CMake the project version number at the next release.
723+ echo "message(STATUS \"JSBSIM_VERSION:\${PROJECT_VERSION}\")" >> src/CMakeLists.txt
724+ export FUTURE_VERSION=`cmake . | grep JSBSIM_VERSION | awk -F':' '{print $2}'`
725+ # Extract the project old version number
726+ export OLD_VERSION=`egrep 'JSBSim-([0-9]+\.)+[0-9]+-setup.exe' README.md | awk -F'JSBSim-' '{ print $2}' | awk -F'-setup.exe' '{ print $1}'`
727+ echo "OLD_VERSION=$OLD_VERSION" >> $GITHUB_ENV
721728 # Update references to the current stable version in README.md
722- export PREV_VERSION=`egrep 'JSBSim-([0-9]+\.)+[0-9]+-setup.exe' README.md | awk -F'JSBSim-' '{ print $2}' | awk -F'-setup.exe' '{ print $1}'`
723- sed -ri 's/_'"$PREV_VERSION"'-[0-9]+.amd64.deb/_'"$VERSION"'-'"$GITHUB_RUN_NUMBER"'.amd64.deb/g' README.md
724- sed -ri 's/'"$PREV_VERSION"'/'"$VERSION"'/g' README.md
725- sed -ri 's/'"$PREV_VERSION"'/'"$VERSION"'/g' matlab/README.md
729+ sed -ri 's/_'"$OLD_VERSION"'-[0-9]+.amd64.deb/_'"$VERSION"'-'"$GITHUB_RUN_NUMBER"'.amd64.deb/g' README.md
730+ sed -ri 's/'"$OLD_VERSION"'/'"$VERSION"'/g' README.md
731+ sed -ri 's/'"$OLD_VERSION"'/'"$VERSION"'/g' matlab/README.md
726732 # Update the MSVC project files.
727- sed -ri 's/JSBSIM_VERSION="$PREV_VERSION"/JSBSIM_VERSION="$VERSION"/g' JSBSim.vcxproj
728- sed -ri 's/JSBSIM_VERSION="$PREV_VERSION"/JSBSIM_VERSION="$VERSION"/g' JSBSimForUnreal.vcxproj
733+ sed -ri 's/JSBSIM_VERSION=".*"/JSBSIM_VERSION="'$FUTURE_VERSION'"/g' JSBSim.vcxproj
729734 # Update the MSVC version
730735 sed -ri 's/Visual Studio\s[A-Za-z0-9 ]+\s\(build\s[0-9.]+\)/'"$MSVC_VERSION"'/g' matlab/README.md
731736 # Determine the branch name
@@ -734,7 +739,7 @@ jobs:
734739 git config --global user.name "github-actions[bot]"
735740 git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
736741 git checkout $BRANCH_NAME
737- git commit -m "Bump version" CMakeLists.txt README.md matlab/README.md
742+ git commit -m "Bump version" CMakeLists.txt README.md matlab/README.md JSBSim.vcxproj
738743 git push origin $BRANCH_NAME
739744
740745 # Bump stable version of the `master` branch
@@ -747,10 +752,9 @@ jobs:
747752 working-directory : _master
748753 run : |
749754 # Update references to the current stable version in README.md
750- export PREV_VERSION=`egrep 'JSBSim-([0-9]+\.)+[0-9]+-setup.exe' README.md | awk -F'JSBSim-' '{ print $2}' | awk -F'-setup.exe' '{ print $1}'`
751- sed -ri 's/_'"$PREV_VERSION"'-[0-9]+.amd64.deb/_'"$VERSION"'-'"$GITHUB_RUN_NUMBER"'.amd64.deb/g' README.md
752- sed -ri 's/'"$PREV_VERSION"'/'"$VERSION"'/g' README.md
753- sed -ri 's/'"$PREV_VERSION"'/'"$VERSION"'/g' matlab/README.md
755+ sed -ri 's/_'"$OLD_VERSION"'-[0-9]+.amd64.deb/_'"$VERSION"'-'"$GITHUB_RUN_NUMBER"'.amd64.deb/g' README.md
756+ sed -ri 's/'"$OLD_VERSION"'/'"$VERSION"'/g' README.md
757+ sed -ri 's/'"$OLD_VERSION"'/'"$VERSION"'/g' matlab/README.md
754758 # Update the MSVC version
755759 sed -ri 's/Visual Studio\s[A-Za-z0-9 ]+\s\(build\s[0-9.]+\)/'"$MSVC_VERSION"'/g' matlab/README.md
756760 git commit -m "Bump stable release version" README.md matlab/README.md
@@ -770,7 +774,7 @@ jobs:
770774 with :
771775 python-version : ' 3.7'
772776 - name : Install Python packages
773- run : pip install -U numpy sphinx
777+ run : pip install -U numpy sphinx cython 'setuptools>=60.0.0'
774778 - name : Checkout JSBSim
775779 uses : actions/checkout@v2
776780 - name : Configure JSBSim
0 commit comments