Skip to content

Commit

Permalink
Trim any newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
cicdguy committed Nov 16, 2023
1 parent 9249bc3 commit d6ca1df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/version-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d6ca1df

Please sign in to comment.