Commit bf413198 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Manage all flatpak repos in each commit

parent f44390aa
......@@ -37,6 +37,5 @@ flatpak:
- privileged
artifacts:
paths:
- flatpak
- tarot.flatpakrepo
- public/flatpak
expire_in: 1 month
......@@ -9,13 +9,34 @@ then
GPG_SIGN="--gpg-sign=C8ECB5A2"
fi
# Download the whole Flatpak repository (every remotes)
for ref in $(wget -O- https://framagit.org/api/v4/projects/13713/repository/branches 2>/dev/null | jq -r '.[].name')
do
echo "Downloading the flatpak repo for $ref..."
mkdir current-ref || exit 1
cd current-ref || exit 1
# Download the flatpak repo
wget -O archive.zip \
$CI_PROJECT_URL/-/jobs/artifacts/$ref/download?job=$CI_JOB_NAME
unzip archive.zip
mkdir -p public/flatpak/$ref
tar cf filtered.tar.gz public/flatpak/$ref
cd .. || exit 1
mv current-ref/filtered.tar.gz .
rm -r current-ref || exit 1
tar xf filtered.tar.gz || exit 1
rm filtered.tar.gz || exit 1
done
# Add our new version
cp public/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
rm -rf host-config || exit 1
mkdir -p host-config || exit 1
mkdir -p "public/flatpak/$CI_COMMIT_REF_NAME" || exit 1
(cd host-config \
&& ../tarot-$VERSION/configure \
FLATPAK_BUILDER_FLAGS="--repo=flatpak $GPG_SIGN" \
FLATPAK_BUILDER_FLAGS="--repo=../public/flatpak/$CI_COMMIT_REF_NAME $GPG_SIGN" \
--enable-silent-rules=yes \
--enable-valgrind=yes \
--without-cairo \
......@@ -26,14 +47,22 @@ mkdir -p host-config || exit 1
&& make -j flatpak \
&& (echo "pass" ; echo "pass") | flatpak-builder --run build-dir ../tarot-$VERSION/eu.planete_kraus.Tarot.json tarot -s ";)") \
|| exit 1
cat > tarot.flatpakrepo <<EOF
if test "x$CI_PAGES_URL" = "x"
then
echo "Gitlab version $CI_SERVER_VERSION < 11.8"
export CI_PAGES_URL="https://gugurumbe.frama.io/tarot"
fi
echo "The pages URL is $CI_PAGES_URL"
cat > public/flatpak/$CI_COMMIT_REF_NAME/tarot.flatpakrepo <<EOF
[Flatpak Repo]
Title = Tarot repository -- '$CI_COMMIT_REF_NAME'
Url = $CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_REF_NAME/raw/flatpak?job=$CI_JOB_NAME
Homepage = https://gugurumbe.frama.io/tarot/share/doc/tarot/tarot.html/index.html
Url = $CI_PAGES_URL/flatpak/$CI_COMMIT_REF_NAME
Homepage = $CI_PAGES_URL/share/doc/tarot/tarot.html/index.html
Comment = The Amazing Repository Of TAROT
Description = This is where I host the flatpaks for my personal project, only for the reference '$CI_COMMIT_REF_NAME'
Icon = https://gugurumbe.frama.io/tarot/share/doc/tarot/tarot.svg
GPGKey = $(gpg --export C8ECB5A2 | base64 --wrap=0)
EOF
cp -R host-config/flatpak .
......@@ -17,13 +17,3 @@ There is a developer blog at
If you have a bug, you don't understand something, or have a dream,
come and share it with me on the fediverse (=@vk@mamot.fr=) or by
email.
If you want to stay up-to-date, but don't want to break your system,
and you don't have the dependencies, why not trying Flatpak? You have:
- [[https://framagit.org/gugurumbe/tarot/-/jobs/artifacts/master/raw/tarot.flatpakrepo?job=flatpak][a flatpakrepo for the =master= branch]], with the latest version;
- [[https://framagit.org/gugurumbe/tarot/-/jobs/artifacts/develop/raw/tarot.flatpakrepo?job=flatpak][a flatpakrepo for the =develop= branch]], with all the exciting new
features that have not been released yet;
- a flatpakrepo for *each merge request in progress*. That's crazy:
you can test in real time the merge requests. For this, I can't
give you a static URL, but you will find a flatpakrepo in the
artifacts of the first commit (or any subsequent commit) of the MR.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment