Skip to content

Commit

Permalink
update to prod-v20210805
Browse files Browse the repository at this point in the history
- update build/gen_conf.sh script to increase ynhx suffixe based on previous tag.
  • Loading branch information
artlog committed Jan 3, 2022
1 parent b38e09d commit 6bb936b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
20 changes: 18 additions & 2 deletions build/gen_conf.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

get_ynh_version_number()
{
trivabble_ynh_git_tag=$(git tag -l --sort=-creatordate | head -n 1)
if [[ $trivabble_ynh_git_tag =~ .*\.ynh([1-9]*) ]]
then
ynh_number=$(( ${BASH_REMATCH[1]} + 1 ))
echo $ynh_number
else
echo "0"
fi
}

if [[ ! -d ../conf ]]
then
Expand Down Expand Up @@ -34,7 +45,7 @@ if [[ ! -f $source_tgz ]]
then
if wget $SOURCE_URL
then
echo "[INFO] $source_tgz retrieved"
echo "[INFO] $source_tgz retrieved" >&2
else
echo "[FATAL] can't retrieve $source_tgz frm $SOURCE_URL" >&2
exit 1
Expand Down Expand Up @@ -64,6 +75,11 @@ manifest=../manifest.json

if [[ -f $manifest ]]
then
version=1.$trivabble_git_tag.ynh4
version=1.$trivabble_git_tag.ynh$(get_ynh_version_number)
trivabble_ynh_git_tag=$version
sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" $manifest
echo "Once commint is done, please tag it with :"
echo "git tag $trivabble_ynh_git_tag"
else
echo "[WARNING] Missing $manifest file. Can't update it" >&2
fi
4 changes: 2 additions & 2 deletions conf/app.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCE_URL=https://gitlab.com/raphj/trivabble/-/archive/prod-v20201017.1/trivabble-prod-v20201017.1.tar.gz
SOURCE_SUM=2a094e5c322b2c2a245fbd9bef00e3eac43c718a0dca67a29f6a0f80974b865a
SOURCE_URL=https://gitlab.com/raphj/trivabble/-/archive/prod-v20210805/trivabble-prod-v20210805.tar.gz
SOURCE_SUM=5fb1baf0bf04d192adda476d2a0a209721f49e463e6ddc960215c0a92b52f9f4
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"en": "a network Scrabble® game free play not enforcing rules",
"fr": "un jeu de Scrabble® en jeu libre, à l'utilisateur d'appliquer les règles."
},
"version": "1.prod-v20201017.1.ynh4",
"version": "1.prod-v20210805.ynh5",
"url": "https://trivabble.1s.fr/",
"license": "AGPL-3.0-or-later",
"maintainer": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# should somehow relate to app.src
# git url to retrieve original source
trivabble_git_url=https://gitlab.com/raphj/trivabble.git
trivabble_git_tag=prod-v20201017.1
trivabble_git_tag=prod-v20210805

# dependencies used by the app
pkg_dependencies="nodejs"
Expand Down

0 comments on commit 6bb936b

Please sign in to comment.