Commit 8171ed5b authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Remove the packaging

parent 7a0f7195
......@@ -3,7 +3,6 @@ image: debian:latest
stages:
- dist
- check
- package
- manual
dist:
......@@ -12,7 +11,7 @@ dist:
script: "./ci/dist.sh"
artifacts:
paths:
- public
- dist
expire_in: 1 week
check:
......@@ -28,14 +27,3 @@ pages:
paths:
- public
expire_in: 1 week
flatpak:
stage: package
image: tarotbis/package:latest
script: "./ci/flatpak.sh"
tags:
- privileged
artifacts:
paths:
- public/flatpak
expire_in: 1 month
......@@ -38,7 +38,6 @@ include standard-files.am
include gitlab-ci.am
include distcheck.am
include indent.am
include flatpak.am
include doc/Makefile.am
include src/Makefile.am
include games/Makefile.am
......
......@@ -19,5 +19,4 @@
EXTRA_DIST += \
%reldir%/dist.sh \
%reldir%/pages.sh \
%reldir%/check.sh \
%reldir%/flatpak.sh
%reldir%/check.sh
#!/bin/sh
VERSION=$(cat public/version)
VERSION=$(cat dist/version)
cp public/tarot-$VERSION.tar.gz . || exit 1
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
mkdir build || exit 1
cd build/
......
......@@ -10,7 +10,7 @@ mkdir -p ../clean
chmod -R ugo+w ../clean || exit 1
rm -rf ../clean || exit 1
mkdir -p ../clean || exit 1
rm -rf $SOURCE_TOP/public || exit 1
rm -rf $SOURCE_TOP/dist || exit 1
cd $CLEAN_TOP
git clone $SOURCE_TOP . || exit 1
......@@ -21,7 +21,7 @@ sh autogen.sh VALAFLAGS="--target-glib=2.50" || exit 1
./configure \
CFLAGS="-Wall -Wextra -Werror -g $CFLAGS" \
VALAFLAGS="--target-glib=2.50" \
--prefix="$SOURCE_TOP/public" \
--prefix="$SOURCE_TOP/dist" \
--enable-valgrind=yes \
--enable-renderer=yes \
--enable-generator=yes \
......@@ -101,7 +101,7 @@ fi
## Nice!
cd $SOURCE_TOP || exit 1
mkdir -p $SOURCE_TOP/public || exit 1
mkdir -p $SOURCE_TOP/dist || exit 1
cp $SOURCE_TOP/.version \
$SOURCE_TOP/public/version || exit 1
cp tarot-*.tar.gz $SOURCE_TOP/public/ || exit 1
$SOURCE_TOP/dist/version || exit 1
cp tarot-*.tar.gz $SOURCE_TOP/dist/ || exit 1
#!/bin/bash
VERSION=$(cat public/version)
GPG_SIGN=""
if gpg --import /tarot.gpg
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=../public/flatpak/$CI_COMMIT_REF_NAME $GPG_SIGN" \
--enable-silent-rules=yes \
--enable-valgrind=yes \
--without-cairo \
--without-gtk \
--without-gobject \
&& (cd lib-library && make -j) \
&& (cd lib-program && make -j) \
&& make -j flatpak \
&& (echo "pass" ; echo "pass") | flatpak-builder --run build-dir ../tarot-$VERSION/eu.planete_kraus.Tarot.json tarot -s ";)") \
|| exit 1
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_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
#!/bin/sh
VERSION=$(cat public/version)
VERSION=$(cat dist/version)
cp public/tarot-$VERSION.tar.gz . || exit 1
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
mkdir build || exit 1
cd build/
......@@ -16,56 +16,3 @@ cd build/
|| (cat config.log; exit 1)
make -j 16 install-html || exit 1
make distclean || exit 1
LIST_BRANCHES_URL="$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/branches"
echo "Finding branches from API... $LIST_BRANCHES_URL"
ALL_BRANCHES=$(wget -O- $LIST_BRANCHES_URL 2>/dev/null | jq -r '.[].name')
echo "All branches: $ALL_BRANCHES"
REFS=$(
for ref in $ALL_BRANCHES
do
case $ref in
master | develop);;
*) echo "$ref";;
esac
done)
echo "The refs are: $REFS"
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/download.html <<EOF
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Download TAROT</title>
</head>
<body>
<h1>Download tarot</h1>
<p>You have several options for downloading tarot.</p>
<h2>Download as a <a href="https://flatpak.org/">Flatpak repository</a></h2>
<p>
<ul>
<li>In order to run the latest version, simply add the "master" <a href="$CI_PAGES_URL/flatpak/master/tarot.flatpakrepo" download="tarot-master.flatpakrepo">Flatpakrepo</a>;
</li>
<li>If you want the latest unreleased features, add the "develop" <a href="$CI_PAGES_URL/flatpak/develop/tarot.flatpakrepo" download="tarot-develop.flatpakrepo">Flatpakrepo</a>;
</li>
$(for ref in $REFS; do echo "<li>(only for developers) If you want to track the work in progress for the feature $ref, add its own <a href=\"$CI_PAGES_URL/flatpak/$ref/tarot.flatpakrepo\" download=\"tarot-wip.flatpakrepo\">Flatpakrepo</a>;</li>" ; done)
</ul>
</p>
</body>
</html>
EOF
......@@ -146,7 +146,6 @@ AC_CONFIG_FILES([ po/Makefile.in
AC_CONFIG_FILES([
pre-inst-env
eu.planete_kraus.Tarot.desktop
eu.planete_kraus.Tarot.json
blog/setup.el
], [chmod +x pre-inst-env])
......
{
"app-id": "eu.planete_kraus.Tarot",
"runtime": "org.freedesktop.Platform",
"runtime-version": "18.08",
"sdk": "org.freedesktop.Sdk",
"command": "tarot",
"finish-args": [
"--socket=x11",
"--socket=wayland",
"--share=ipc"
],
"modules": [
{
"name": "tarot",
"buildsystem": "autotools",
"sources": [
{
"type": "archive",
"path": "tarot-@VERSION@.tar.gz"
}
],
"config-opts": [
"--enable-silent-rules=yes",
"--disable-introspection",
"--disable-vala",
"--disable-renderer"
]
}
]
}
# flatpak.am
#
# Copyright (C) 2017, 2018 Vivien Kraus <vivien@planete-kraus.eu>
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
EXTRA_DIST += eu.planete_kraus.Tarot.json
.PHONY: flatpak
flatpak: dist eu.planete_kraus.Tarot.json
@rm -rf build-dir
$(FLATPAK_BUILDER) $(FLATPAK_BUILDER_FLAGS) build-dir eu.planete_kraus.Tarot.json
@rm -f tarot-upstream.tar.gz eu.planete_kraus.Tarot.json
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