Skip to content

Commit

Permalink
Merge pull request #14 from thsfs/changelog_workflow
Browse files Browse the repository at this point in the history
Change the current dir to the workspace
  • Loading branch information
thsfs authored May 14, 2022
2 parents fdc724f + fb0d84c commit 90e1596
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
-v ${GITHUB_WORKSPACE}:/workspace \
-v ${GITHUB_WORKSPACE}/artifacts:/artifacts \
nanocurrency/nano-env:gcc \
/bin/bash -c "/workspace/ci/generate-changelog2.sh /artifacts thsfs/nano-node"
/bin/bash -c "/workspace/ci/generate-changelog2.sh /artifacts /workspace thsfs/nano-node"
- name: Create SSH key
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
Expand Down
4 changes: 3 additions & 1 deletion ci/generate-changelog2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ PAT=$(echo "${PAT}")
set -x

output_dir="${1:-$(pwd)}"
repository="${2:-thsfs/nano-node}"
workspace="${2:-$(pwd)}"
repository="${3:-thsfs/nano-node}"

# matches V1.0.0 and V1.0 formats
version_re="^(V[0-9]+.[0-9]+(.[0-9]+)?)$"
Expand Down Expand Up @@ -39,6 +40,7 @@ read -r version_major version_minor version_revision <<< $( echo "${TAG}" | awk
previous_version_major=$(( version_major - 1 ))

echo "Getting the tag of the most recent previous version"
pushd "$workspace"
version_tags=$(git tag | grep -E "^(V(${previous_version_major}).[0-9]+(.[0-9]+)?)$" | sort)
for tag in $version_tags; do
newest_previous_version=$tag
Expand Down

0 comments on commit 90e1596

Please sign in to comment.