forked from osmocom/wireshark
Packaging+GitLab CI: Dist tarball updates.
Ninja keeps track of its built files in .ninja_log, so if you copy a pre-built target into a fresh build directory, Ninja will ignore and overwrite it. This includes the tarball generated by the 'dist' target. In get-export-release.sh, check for a preexisting tarball and preserve it by default. This lets us pass the dist tarball from one GitLab CI stage to other stages without recreating it. It's also arguably the right thing to do in general, since we record and publish the tarball hashes for each release and different contents for the same filename can cause confusion. Move the dist tarball to the build directory in .gitlab-ci.yml, and add a note about using the tarball exclusively.
This commit is contained in:
parent
9b0c3f5eaf
commit
0d820ddc8d
|
@ -62,11 +62,14 @@ variables:
|
|||
.build-rpm:
|
||||
extends: .build
|
||||
before_script:
|
||||
# It might make sense to set "GIT_STRATEGY: none" and build from
|
||||
# the tarball.
|
||||
- git config --global user.email "you@example.com"
|
||||
- git config --global user.name "Your Name"
|
||||
- mkdir build
|
||||
- cd build
|
||||
- perl ../tools/make-version.pl --set-release
|
||||
- mv -v ../wireshark-*.tar.* .
|
||||
artifacts:
|
||||
paths:
|
||||
- build/packaging/rpm/RPMS
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set -e
|
||||
set -e -u -o pipefail
|
||||
|
||||
DESTDIR=.
|
||||
|
||||
|
@ -35,10 +35,15 @@ shift $(( OPTIND - 1 ))
|
|||
# or 3.4.5-67-gabcd4321
|
||||
# By default the version from make-version.pl + CMake is used.
|
||||
VERSION=@VERSION@
|
||||
if test -n "$1"; then
|
||||
if test -n "${1-}"; then
|
||||
VERSION="$1"
|
||||
fi
|
||||
|
||||
if [ -f "${DESTDIR}/wireshark-$VERSION.tar.xz" ] ; then
|
||||
echo "${DESTDIR}/wireshark-$VERSION.tar.xz exists."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
STASH_POP=false
|
||||
XZ_OPTS=
|
||||
|
||||
|
@ -49,7 +54,7 @@ if ! git diff-index --quiet HEAD ; then
|
|||
STASH_POP=true
|
||||
fi
|
||||
|
||||
echo "Creating wireshark-$VERSION.tar.xz"
|
||||
echo "Creating ${DESTDIR}/wireshark-$VERSION.tar.xz"
|
||||
|
||||
echo . | xz --threads=0 > /dev/null 2>&1 && XZ_OPTS=--threads=0
|
||||
|
||||
|
|
Loading…
Reference in New Issue