Updated packaging script to better handle static packaging (#8859)
parent
65bcddf6c0
commit
fba7c9fc5e
|
@ -49,8 +49,13 @@ docker build -t influxdata/influxdb/releng/packages:latest "$SRCDIR"
|
|||
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
STATIC=""
|
||||
case "$(basename "$SRC_TARBALL")" in
|
||||
*static*) STATIC="-s";;
|
||||
esac
|
||||
|
||||
docker run --rm \
|
||||
--mount type=bind,source="${OUTDIR}",destination=/out \
|
||||
--mount type=bind,source="${SRC_TARBALL}",destination=/influxdb-src.tar.gz \
|
||||
--mount type=bind,source="${BIN_TARBALL}",destination=/influxdb-bin.tar.gz \
|
||||
influxdata/influxdb/releng/packages:latest -O "$OS" -A "$ARCH"
|
||||
influxdata/influxdb/releng/packages:latest -O "$OS" -A "$ARCH" $STATIC
|
||||
|
|
|
@ -18,12 +18,14 @@ fi
|
|||
|
||||
OS=""
|
||||
ARCH=""
|
||||
STATIC=""
|
||||
|
||||
while getopts hO:A: arg; do
|
||||
while getopts hO:A:s arg; do
|
||||
case "$arg" in
|
||||
h) printHelp; exit 1;;
|
||||
O) OS="$OPTARG";;
|
||||
A) ARCH="$OPTARG";;
|
||||
s) STATIC="1";;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -73,8 +75,11 @@ if [ "$OS" == "linux" ]; then
|
|||
cp /ibin/* /pkg/usr/bin/
|
||||
|
||||
# Make tarball of files in packaging.
|
||||
(cd /pkg && tar czf "/out/influxdb-pkg-${OS}-${ARCH}-${SHA}.tar.gz" ./*)
|
||||
(cd /pkg && tar czf "/out/influxdb-oss-${VERSION}_${OS}_${ARCH}.tar.gz" ./*)
|
||||
|
||||
if [ "$STATIC" == "1" ]; then
|
||||
mv /out/influxdb-oss-${VERSION}-${OS}-${ARCH}.tar.gz /out/influxdb-oss-static_${VERSION}_${OS}_${ARCH}.tar.gz
|
||||
else
|
||||
# Call fpm to build .deb and .rpm packages.
|
||||
for typeargs in "-t deb" "-t rpm --depends coreutils"; do
|
||||
fpm \
|
||||
|
@ -100,11 +105,12 @@ if [ "$OS" == "linux" ]; then
|
|||
-C /pkg \
|
||||
-p /out
|
||||
done
|
||||
fi
|
||||
|
||||
#############################
|
||||
######### Checksums #########
|
||||
#############################
|
||||
(cd /out && for f in *.deb *.rpm; do
|
||||
(cd /out && for f in *.deb *.rpm *.tar.gz; do
|
||||
md5sum "$f" > "$f.md5"
|
||||
sha256sum "$f" > "$f.sha256"
|
||||
done)
|
||||
|
|
Loading…
Reference in New Issue