File: generate-debian-directory

package info (click to toggle)
syslog-ng 3.19.1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,176 kB
  • sloc: ansic: 114,472; makefile: 4,697; sh: 4,391; python: 4,282; java: 4,047; xml: 2,435; yacc: 1,108; lex: 426; perl: 193; awk: 184
file content (17 lines) | stat: -rwxr-xr-x 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

MODE=$1
VERSION=`cat /source/VERSION`

cp -r /source/packaging/debian .
if [ $MODE = "snapshot" ]; then
	echo "Generating snapshot version in debian/"
	DEBEMAIL="dev@null" DEBFULLNAME="syslog-ng snapshot" debchange --newversion ${VERSION}-${MODE}+`date +%Y%m%dT%H%M%S` "Snapshot release based on ${GITREF}"
elif [ $MODE = "release" ]; then
	echo "Validating if your debian/ directory matches current version"
	DEB_VERSION=`dpkg-parsechangelog -S Version | cut -d - -f1`
	if [ "${DEB_VERSION}" != "${VERSION}" ]; then
		echo "The version numbers in debian/changelog do not match the current version number. Cannot generate a release tarball this way"
		exit 1
	fi
fi