diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 9e3a73e0..708a068e 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -87,18 +87,11 @@ jobs: fi # Replace only the first occurence of $NEWS_VERSION, # but only if it's not already set to (development version) - if [ "$NEWS_VERSION" != "(development version)" ] + if [ "${NEWS_VERSION}" != "(development version)" ] then { sed -i "0,/$NEWS_VERSION/s/$NEWS_VERSION/$DESC_VERSION/" NEWS.md } fi - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) - echo "Updated NEWS.md version: $NEWS_VERSION" - if (test $DESC_VERSION != $NEWS_VERSION ); then - echo "🙈 Updated NEWS.md and DESCRIPTION have different versions!" - echo "Please ensure that the versions in the NEWS.md and DESCRIPTION are the same 🙏" - exit 1 - fi echo "NEW_PKG_VERSION=${DESC_VERSION}" >> $GITHUB_ENV } fi diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index fcb35eeb..d0ca738f 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -44,13 +44,13 @@ jobs: DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}') echo "NEWS.md version: $NEWS_VERSION" echo "DESCRIPTION version: $DESC_VERSION" - if [[ "$DESC_VERSION" == "$NEWS_VERSION" ]] + if [[ "${DESC_VERSION}" == "${NEWS_VERSION}" ]] then { echo "NEWS.md and DESCRIPTION have the same version 🎉" exit 0 } fi - if [[ $DESC_DEV_VERSION -ge 9000 && "$NEWS_VERSION" == "(development version)" ]] + if [[ $DESC_DEV_VERSION -ge 9000 && "${NEWS_VERSION}" == "(development version)" ]] then { echo "NEWS.md and DESCRIPTION file versions are okay as package is in development mode." echo "All is okay 🆗"