Files
upstream-jibri/resources/jenkins/release.sh
upstream-mirror 650a143b63
Some checks failed
Java CI with Maven / Java 17 (push) Failing after 4m40s
Java CI with Maven / Java 21 (push) Failing after 4m41s
snapshot of https://github.com/jitsi/jibri.git @ 3b45602c539ec69d128ea152ae587d0b6582191a (2026-09-15)
2026-09-15 16:13:58 +05:00

39 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -e
# This script should be run after the build/tests have successfully completed
# Prune any local tags that aren't on the remote
git fetch --prune origin "+refs/tags/*:refs/tags/*"
cd $WORKSPACE
# Let's get version from maven
MVNVER=`xmllint --xpath "/*[local-name()='project']/*[local-name()='version']/text()" pom.xml`
TAG_NAME="v${MVNVER/-SNAPSHOT/}"
echo "Current tag name: $TAG_NAME"
if ! git rev-parse $TAG_NAME >/dev/null 2>&1
then
git tag -a $TAG_NAME -m "Tagged automatically by Jenkins"
git push origin $TAG_NAME
else
echo "Tag: $TAG_NAME already exists."
fi
VERSION_FULL=`git describe --match "v[0-9\.]*" --long`
echo "Full version: ${VERSION_FULL}"
VERSION=${VERSION_FULL:1}
echo "Package version: ${VERSION}"
REV=$(git log --pretty=format:'%h' -n 1)
# bulding the debian package expects the file target/jibri.jar
mv target/jibri-${MVNVER}-jar-with-dependencies.jar target/jibri.jar
dch -v "${VERSION}-1" "Built from git. $REV"
dch -D unstable -r ""
dpkg-buildpackage -A -rfakeroot -us -uc