added a better version source...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-09-15 21:39:45 +03:00
parent 09efdef318
commit b28e5bba50
3 changed files with 15 additions and 9 deletions

View File

@ -14,19 +14,19 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Get version tag
id: version
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: 0.1
- name: Build dist
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make git zip
git config --global --add safe.directory '*'
echo "VERSION=$(make version)" >> $GITHUB_ENV
make dist CTAN
- name: Version
with:
run: |
echo "::notice:: VERSION=${{ env.VERSION }}"
- name: Release
uses: softprops/action-gh-release@v1
@ -54,7 +54,7 @@ jobs:
file_path: dist/CTAN/photobook.zip
fields: |
pkg: photobook
version: ${{ steps.version.outputs.tag }}
version: ${{ env.VERSION }}
author: Alex A. Naanou
email: alex.nanou@gmail.com
uploader: Alex A. Naanou <alex.nanou@gmail.com>

View File

@ -58,7 +58,8 @@ MODULE := photobook
VERSION = $(strip $(shell \
cat $(MODULE).cls \
| grep 'VERSION{' \
| sed 's/.*{\(.*\)}.*/\1/'))
| sed 's/.*{\(.*\)}.*/\1/' \
| sed 's/v//'))
DATE = $(strip $(shell date "+%Y%m%d%H%M"))
COMMIT = $(strip $(shell git rev-parse HEAD))
@ -244,6 +245,11 @@ version:
@echo $(VERSION)
.PHONY: tag
tag:
git tag "$(VERSION)"
#----------------------------------------------------------------------
# Main targets...

View File

@ -58,7 +58,7 @@
%%% NOTE: \def\<module-name>@[A-Z]+ macros will be visible to both the
%%% code and the generated docs...
\edef\photobook@FILEVERSION{v0.1}
\edef\photobook@FILEVERSION{v0.1.2}
\edef\photobook@FILEDATE{2021-07-28}