Skip to content

Commit

Permalink
Set release version and date from git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed May 3, 2022
1 parent 6defed4 commit 1c9b7ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<url type="bugtracker">https://github.com/4lex4/scantailor-advanced/issues</url>
<url type="homepage">https://github.com/4lex4/scantailor-advanced</url>
<releases>
<release version="2019.8.16 Early Access" date="2019-08-16" />
<release version="{RELEASE_VERSION}" date="{RELEASE_DATE}" />
</releases>
<content_rating type="oars-1.1" />
</component>
20 changes: 13 additions & 7 deletions com.github._4lex4.ScanTailor-Advanced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,30 @@ modules:

- name: scantailor-advanced
sources:
- type: archive
url: https://github.com/4lex4/scantailor-advanced/archive/refs/tags/2019.8.16_EA.tar.gz
sha256: 7ee3aaffa9a234a3171d3d0d75bc34a6acc7e78f85f5a70d6cf7ae481c8d1a48
- type: git
url: https://github.com/4lex4/scantailor-advanced.git
tag: 2019.8.16_EA
commit: c5eba3933f7e47fde753a8d51cd6ee2ff3d9954e
x-checker-data:
type: json
url: https://api.github.com/repos/4lex4/scantailor-advanced/releases
version-query: '[.[] | select(.draft == false and .prerelease == true)][0].tag_name'
url-query: '"https://github.com/4lex4/scantailor-advanced/archive/refs/tags/" + $version + ".tar.gz"'
tag-query: '[.[] | select(.draft == false and .prerelease == true)][0].tag_name'
- type: file
path: com.github._4lex4.ScanTailor-Advanced.metainfo.xml
path: com.github._4lex4.ScanTailor-Advanced.metainfo.xml.in
- type: patch
path: scantailor-qt5.15.patch
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
post-install:
- install -Dm0644 -t /app/share/metainfo ../com.github._4lex4.ScanTailor-Advanced.metainfo.xml
- |
# Set version and release data in our custom Metainfo and install it
set -e
version="$(git describe --tags --exact-match)"
date="$(git log -1 --date=short --format=%cd)"
sed -e "s/{RELEASE_VERSION}/${version}/g" -e "s/{RELEASE_DATE}/${date}/g" ../com.github._4lex4.ScanTailor-Advanced.metainfo.xml.in >com.github._4lex4.ScanTailor-Advanced.metainfo.xml
install -Dm0644 -t /app/share/metainfo com.github._4lex4.ScanTailor-Advanced.metainfo.xml
- mv /app/share/mime/packages/scantailor-project.xml /app/share/mime/packages/com.github._4lex4.ScanTailor-Advanced.xml
- |
for res in 16 32 48 64 128 256 512; do
Expand Down

0 comments on commit 1c9b7ee

Please sign in to comment.