diff options
author | Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> | 2020-12-04 01:29:00 +0100 |
---|---|---|
committer | Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at> | 2020-12-04 01:29:00 +0100 |
commit | 398c4321da79becdacf0aa052dfb79c3849edea0 (patch) | |
tree | 937bdc9bc94da58dfddec155663d7b854381cf5f /helpers | |
parent | 1098ccaac8d960ae730422ce37bde293109973a0 (diff) | |
download | xfce4-dev-tools-398c4321da79becdacf0aa052dfb79c3849edea0.tar.gz |
helpers: Add helper to locally run xfce-build
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/Makefile.am | 1 | ||||
-rw-r--r-- | helpers/README.md | 3 | ||||
-rwxr-xr-x | helpers/xfce-build | 22 |
3 files changed, 26 insertions, 0 deletions
diff --git a/helpers/Makefile.am b/helpers/Makefile.am index 29defe4..b9e7a2d 100644 --- a/helpers/Makefile.am +++ b/helpers/Makefile.am @@ -3,6 +3,7 @@ # bin_SCRIPTS = \ + xfce-build \ xfce-do-release \ xfce-get-release-notes \ xfce-get-translations \ diff --git a/helpers/README.md b/helpers/README.md index c171d4f..a4b28c4 100644 --- a/helpers/README.md +++ b/helpers/README.md @@ -1,6 +1,9 @@ # xfce-helpers Just some small helpers for developing Xfce +## xfce-build +A script to locally run the same build we run on GitLab CI. + ## xfce-do-release A quick playbook that goes through my steps when doing an Xfce release, with all the steps that could be automated. diff --git a/helpers/xfce-build b/helpers/xfce-build new file mode 100755 index 0000000..1c89c25 --- /dev/null +++ b/helpers/xfce-build @@ -0,0 +1,22 @@ +#!/bin/bash + +# Just a small script that runs the same build that we have on gitlab-ci locally. + +CONTAINER="xfce/xfce-build" +VERSION="latest" +CFLAGS="-Wall -Wno-deprecated-declarations -Werror=implicit-function-declaration -Werror=return-type" +VOLUME=$(pwd) +BUILD_CMD='cd /tmp; ./autogen.sh && make distcheck' + +if [ -z "$1" ]; then + VERSION="latest" +else + VERSION=$1 +fi + +# Make sure we're running the latest version +docker pull xfce/xfce-build:$VERSION + +docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) --volume $VOLUME:/tmp --env CFLAGS="${CFLAGS}" $CONTAINER:$VERSION /bin/bash -c "${BUILD_CMD}" + +printf "\n---\nBuilt using container $CONTAINER:$VERSION on $VOLUME\n" |