diff --git a/.github/workflows/version-bump.yaml b/.github/workflows/version-bump.yaml index 8e513bafe..11faf3dc5 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()))' | tr -d '\n') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') + DESC_VERSION=$(R --slave -e 'cat(paste(desc::desc_get_version()))' | tr -d '\n' | xargs) + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n' | xargs) 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. @@ -87,7 +87,7 @@ 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 } diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml index d4bfba506..27a6a11ee 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 | tr -d '\n') - NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n') + DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION | tr -d '\n' | xargs) + NEWS_VERSION=$(awk '/^#+ /{print $3,$4; exit}' NEWS.md | tr -d '\n' | xargs) DESC_DEV_VERSION=$(echo $DESC_VERSION | awk -F '.' '{print $NF}') echo "NEWS.md version: $NEWS_VERSION" echo "DESCRIPTION version: $DESC_VERSION" diff --git a/NEWS.md b/NEWS.md index 857e0444c..14236bbeb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# r.pkg.template 0.1.0.9130 +# r.pkg.template 0.1.0.9131 ### New features