Skip to content

Commit

Permalink
Bug fix release fix (#271)
Browse files Browse the repository at this point in the history
* 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
e-perl-NOAA and e-perl-NOAA authored Dec 5, 2024
1 parent 25381b2 commit a283495
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/release_bug_fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion SS330_User_Manual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
% pdfauthor={Richard D. Methot Jr., Chantel R. Wetzel, Ian G. Taylor, and Kathryn Doering},
% pdfdisplaydoctitle=true]{hyperref}
\xpretocmd{\maketitle}{\TitlePageFont}{}{}
\title{\textcolor[cmyk]{1.00,0.83,0.41,0.36}{Stock Synthesis User Manual\\ Version 3.30.24}}
\title{\textcolor[cmyk]{1.00,0.83,0.41,0.36}{Stock Synthesis User Manual\\ Version 3.30.24.6}}
\author{Richard D. Methot Jr., Chantel R. Wetzel, Ian G. Taylor, Kathryn L. Doering,\\Elizabeth F. Perl, and Kelli F. Johnson\\\\\\NOAA Fisheries\\Seattle, WA}
\date{December 05, 2024}

Expand Down
4 changes: 2 additions & 2 deletions docs/SS330_User_Manual_release.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="Richard D. Methot Jr., Chantel R. Wetzel, Ian G. Taylor, Kathryn L. Doering, Elizabeth F. Perl, and Kelli F. Johnson NOAA Fisheries Seattle, WA" />
<meta name="dcterms.date" content="2024-12-05" />
<title>Stock Synthesis User Manual Version 3.30.24</title>
<title>Stock Synthesis User Manual Version 3.30.24.6</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="html_usermanual.css" />
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
Expand Down Expand Up @@ -58,7 +58,7 @@
<header id="title-block-header">
<h1 class="title"><span style="color: 1.00,0.83,0.41,0.36">Stock
Synthesis User Manual<br />
Version 3.30.24</span></h1>
Version 3.30.24.6</span></h1>
<p class="author">Richard D. Methot Jr., Chantel R. Wetzel, Ian G.
Taylor, Kathryn L. Doering,<br />
Elizabeth F. Perl, and Kelli F. Johnson<br />
Expand Down

0 comments on commit a283495

Please sign in to comment.