Commit adaac467 authored by Jerome Flesch's avatar Jerome Flesch

Merge branch 'testing' into develop

parents b908de18 bae7227e
Pipeline #102599 passed with stage
in 42 minutes and 32 seconds
......@@ -10,6 +10,12 @@ check:
- apt-get install -y -q pycodestyle flake8 python3-flake8
- make check
linux_flatpak:
tags:
- flatpak
script:
- ./update_flatpak_repo.sh
windows_exe:
variables:
MSYSTEM: "MINGW32"
......
REPO ?= repo
APP = work.openpaper.Paperwork
ALL_TARGETS = $(patsubst %.json,%,$(wildcard *.json))
ALL_BRANCHES = master develop
ALL_BRANCHES = master testing develop
all: upd_branches
......
{
"app-id": "work.openpaper.Paperwork",
"branch": "testing",
"runtime": "org.gnome.Platform",
"runtime-version": "3.30",
"sdk": "org.gnome.Sdk",
"command": "paperwork",
"copy-icon": true,
"finish-args": [
"--share=ipc",
"--share=network",
"--socket=fallback-x11",
"--socket=wayland",
"--filesystem=home",
"--persist=.python-eggs",
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.freedesktop.FileManager1",
"--own-name=work.openpaper.paperwork",
"--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
"--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
"--device=all"
],
"modules": [
"shared-modules/tesseract-4.0.0.json",
"shared-modules/sane-backends-1.0.27.json",
{
"name": "python-setuptools",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/c2/f7/c7b501b783e5a74cf1768bc174ee4fb0a8a6ee5af6afa92274ff964703e0/setuptools-40.8.0.zip",
"sha256": "6e4eec90337e849ade7103723b9a99631c1f0d19990d6e8412dc42f5ae8b304d"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-setuptools-scm",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/54/85/514ba3ca2a022bddd68819f187ae826986051d130ec5b972076e4f58a9f3/setuptools_scm-3.2.0.tar.gz",
"sha256": "52ab47715fa0fc7d8e6cd15168d1a69ba995feb1505131c3e814eb7087b57358"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-setuptools-scm-git-archive",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/7e/2c/0c15b29a1b5940250bfdc4a4f53272e35cd7cf8a34159291b6b4ec9eb291/setuptools_scm_git_archive-1.1.tar.gz",
"sha256": "6026f61089b73fa1b5ee737e95314f41cb512609b393530385ed281d0b46c062"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-distro",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/ca/e3/78443d739d7efeea86cbbe0216511d29b2f5ca8dbf51a6f2898432738987/distro-1.4.0.tar.gz",
"sha256": "362dde65d846d23baee4b5c058c8586f219b5a54be1cf5fc6ff55c4578392f57"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-dateutil",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/ad/99/5b2e99737edeb28c71bcbec5b5dda19d0d9ef3ca3e92e3e925e7c0bb364c/python-dateutil-2.8.0.tar.gz",
"sha256": "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-Levenshtein",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://pypi.python.org/packages/42/a9/d1785c85ebf9b7dfacd08938dd028209c34a0ea3b1bcdb895208bd40a67d/python-Levenshtein-0.12.0.tar.gz",
"sha256": "033a11de5e3d19ea25c9302d11224e1a1898fe5abd23c61c7c360c25195e3eb1"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-pillow",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/3c/7e/443be24431324bd34d22dd9d11cc845d995bcd3b500676bcf23142756975/Pillow-5.4.1.tar.gz",
"sha256": "5233664eadfa342c639b9b9977190d64ad7aca4edc51a966394d7e08e7f38a9f"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
],
"modules": [
{
"name": "python-olefile",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/34/81/e1ac43c6b45b4c5f8d9352396a14144bba52c8fec72a80f425f6a4d653ad/olefile-0.46.zip",
"sha256": "133b031eaf8fd2c9399b78b8bc5b8fcbe4c31e85295749bb17a87cba8f3c3964"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
}
]
},
{
"name": "python-pycountry",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/87/c7/c2c76c3ae4ac79c74c1871ae775ed97b70d475dd90d1e824b1d2fc0cd54f/pycountry-18.12.8.tar.gz",
"sha256": "8ec4020b2b15cd410893d573820d42ee12fe50365332e58c0975c953b60a16de"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-nose",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://pypi.python.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz",
"sha256": "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "libinsane",
"buildsystem": "meson",
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/World/OpenPaperwork/libinsane.git",
"branch": "master",
"disable-shallow-clone": true
}
]
},
{
"name": "python-pyocr",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/World/OpenPaperwork/pyocr.git",
"branch": "master",
"disable-shallow-clone": true
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-pypillowfight",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight.git",
"branch": "master",
"disable-shallow-clone": true
},
{
"type": "file",
"path": "pypillowfight-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-pyxdg",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/47/6e/311d5f22e2b76381719b5d0c6e9dc39cd33999adae67db71d7279a6d70f4/pyxdg-0.26.tar.gz",
"sha256": "fe2928d3f532ed32b39c32a482b54136fe766d19936afc96c8f00645f9da1a06"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-pydbus",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/58/56/3e84f2c1f2e39b9ea132460183f123af41e3b9c8befe222a35636baa6a5a/pydbus-0.6.0.tar.gz",
"sha256": "4207162eff54223822c185da06c1ba8a34137a9602f3da5a528eedf3f78d0f2c"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-natsort",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/b3/5d/c0fbee4ed688fe2ed6533dd4a0124e1470d6692bc29e1da06bc0861ed4ab/natsort-6.0.0.tar.gz",
"sha256": "ff3effb5618232866de8d26e5af4081a4daa9bb0dfed49ac65170e28e45f2776"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-simplebayes",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://pypi.python.org/packages/b9/73/764578df72934940d95a8941cbd374b56319562dda72630fc8bfeaefc350/simplebayes-1.5.8.tar.gz",
"sha256": "363418c0ef185ac2158ebbd6d8afb45aa997254fcb809a73ed20a7d5dccf8b85"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-whoosh",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://files.pythonhosted.org/packages/25/2b/6beed2107b148edc1321da0d489afc4617b9ed317ef7b72d4993cad9b684/Whoosh-2.7.4.tar.gz",
"sha256": "7ca5633dbfa9e0e0fa400d3151a8a0c4bec53bd2ecedc0a67705b17565c31a83"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "python-termcolor",
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"sources": [
{
"type": "archive",
"url": "https://pypi.python.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz",
"sha256": "1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
},
{
"type": "file",
"path": "pip-Makefile",
"dest-filename": "Makefile"
}
]
},
{
"name": "poppler-data",
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-data-0.4.9.tar.gz",
"sha256": "1f9c7e7de9ecd0db6ab287349e31bf815ca108a5a175cf906a90163bdbe32012"
}
]
},
{
"name": "poppler",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DENABLE_LIBOPENJPEG:STRING=none"
],
"sources": [
{
"type": "archive",
"url": "https://poppler.freedesktop.org/poppler-0.74.0.tar.xz",
"sha256": "92e09fd3302567fd36146b36bb707db43ce436e8841219025a82ea9fb0076b2f"
}
]
},
{
"name": "python-paperwork",
"make-install-args": ["PIP_ARGS=--prefix=/app"],
"no-autogen": true,
"ensure-writable": ["/lib/python*/site-packages/easy-install.pth","/lib/python*/site-packages/setuptools.pth"],
"post-install": ["paperwork-shell install_system /app/share/icons /app/share"],
"sources": [
{
"type": "git",
"url": "https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git",
"branch": "testing",
"disable-shallow-clone": true
}
]
}
]
}
#!/bin/sh
echo $PWD
git log -1
LOCKDIR=/tmp/build.lock.d
PIDFILE=${LOCKDIR}/pid
branch="${CI_COMMIT_REF_NAME}"
echo "Branch: ${branch}"
if [ "${branch}" != "master" ] && [ "${branch}" != "testing" ] && [ "${branch}" != "develop" ]; then
echo Nothing to do
exit 0
fi
msg() {
echo "#####" "$@" "######"
}
export LANG=C
if ! mkdir ${LOCKDIR} ; then
pid=$(cat ${PIDFILE})
msg "Lock directory present (PID: ${pid})"
if kill -0 ${pid} ; then
msg "PID ${pid} alive"
exit 1
fi
fi
cleanup() {
msg "Cleaning up ${LOCKDIR}"
rm -rf ${LOCKDIR}
}
# possible race condition if the other was stopping
# -> re-mkdir
mkdir -p ${LOCKDIR}
msg "PID: $$ \> ${PIDFILE}"
echo $$ > ${PIDFILE}
# We make our own copy of the repository: there will be a big .flatpak-builder
# created in it with a lot of cache files we want to reuse later.
mkdir -p ~/git
cd ~/git
if ! [ -d paperwork ] ; then
if ! git clone https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git ;
then
echo "Clone failed !"
exit 1
fi
fi
cd paperwork
if ! git checkout "${branch}" || ! git pull ; then
echo "Git pull failed !"
exit 1
fi
mkdir -p ~/flatpak # directory that contains the repository directory
cd flatpak/
export EXPORT_ARGS="--gpg-sign=E5ACE6FEA7A6DD48"
export REPO=/home/gitlab-runner/flatpak/repo
for arch in x86_64 i386 ; do
msg "=== Architecture: ${arch} ==="
export ARCH_ARGS=--arch=${arch}
msg "Cleaning ..."
if ! make clean ; then
msg "Clean failed"
cleanup
exit 2
fi
if [ -z "${branch}" ]; then
msg "Building ..."
if ! make ; then
msg "Build failed"
cleanup
exit 2
fi
else
msg "Building branch ${branch} ..."
if ! make ${branch}.app ; then
msg "Build failed"
cleanup
exit 2
fi
if ! make upd_repo ; then
msg "Repo update failed"
cleanup
exit 2
fi
fi
msg "Cleaning ..."
if ! make clean ; then
msg "Clean failed"
cleanup
exit 2
fi
done
chmod -R a+rX ${HOME}/flatpak
cleanup
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