-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add increment * update tex file version and html in docs * try previous version of bug fix --------- Co-authored-by: e-perl-NOAA <[email protected]>
- Loading branch information
1 parent
25381b2
commit a283495
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,14 +33,30 @@ jobs: | |
shell: Rscript {0} | ||
|
||
# Get previous version of user manual and create the next version | ||
- name: Application Version | ||
- name: Application Version Bug Fix | ||
id: version | ||
uses: paulhatch/[email protected] | ||
with: | ||
tag_prefix: "v" | ||
version_format: "v${major}.${minor}.${patch}" | ||
bump_each_commit: false | ||
|
||
run: | | ||
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
old="$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))" | ||
echo ${old} | ||
# Extract version components | ||
major=$(echo "${old}" | awk -F. '{print $1}') | ||
minor=$(echo "${old}" | awk -F. '{print $2}') | ||
patch=$(echo "${old}" | awk -F. '{print $3}') | ||
increment=$(echo "${old}" | awk -F. '{print $4}') | ||
if echo "${increment}" | grep -E ^\-?[0-9]?\.?[0-9]+$ | ||
then | ||
increment=$((increment + 1)) | ||
else | ||
increment=1 | ||
fi | ||
# Construct new version string | ||
new_version="${major}.${minor}.${patch}.$increment" | ||
echo "version=${new_version}" >> "$GITHUB_ENV" | ||
echo "version=${new_version}" >> "$GITHUB_OUTPUT" | ||
echo ${new_version} | ||
# Create version.txt to use when changing the version in the tex file | ||
- name: Create version.txt | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters