diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 708a068e..02c4798e 100644 --- a/.github/workflows/version-bump.yaml +++ b/.github/workflows/version-bump.yaml @@ -77,8 +77,8 @@ jobs: if [ -f NEWS.md ] then { git config --global --add safe.directory $(pwd) - DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) + DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))' | tr -d '\n') + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') FIRST_NEWS_LINE=$(head -1 NEWS.md) if [ "${{ inputs.vbump-after-release }}" == "true" ]; then # Add a new section with the released version that will be vbumped below. diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index d0ca738f..92a3ff97 100644 --- a/.github/workflows/version.yaml +++ b/.github/workflows/version.yaml @@ -39,8 +39,8 @@ jobs: - name: NEWS.md and DESCRIPTION Version check 🏁 run: | - DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION) - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md) + DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n') + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}') echo "NEWS.md version: $NEWS_VERSION" echo "DESCRIPTION version: $DESC_VERSION"