From e650072b46fa4b0ccd731ace650e800a4e76d17c Mon Sep 17 00:00:00 2001 From: Olaf Meeuwissen Date: Mon, 3 Jul 2017 20:46:10 +0900 Subject: [PATCH] Add CI support to build tarball snapshots --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..7812296 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +# .gitlab-ci.yml -- to build source tarball snapshots +# Copyright (C) 2017 Olaf Meeuwissen +# +# License: GPL-3.0+ + +variables: + REGISTRY_HUB: "registry.gitlab.com/sane-project/ci-envs" + +stages: + - archive + +archive: + stage: archive + image: $REGISTRY_HUB:debian-8-full + before_script: + - apt-get update --quiet + - apt-get install --quiet --assume-yes libsane-dev + script: + - build=$(git describe --dirty --match '1.*' | sed 's/.*\.//; s/-.*//'); \ + extra=$(git describe --dirty --match '1.*' | sed 's/^[^-]*//'); \ + sed -i "/^V_BUILD/s/=.*/=$build/; /^V_EXTRA/s/=.*/=$extra/" configure.ing + - autoconf --force + - ./configure + - make dist + artifacts: + paths: + - sane-frontends-*.tar.gz