File: before_deploy

package info (click to toggle)
libad9361 0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,440 kB
  • sloc: ansic: 16,065; sh: 165; makefile: 7
file content (58 lines) | stat: -rwxr-xr-x 1,539 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh -xe

. CI/travis/lib.sh

check_file()
{
temp=$(find ./build* -maxdepth 1 -name "*.$1")
if [ "$(echo ${temp} | wc -w)" -gt "1"  ] ; then
	echo "I am confused - more than 2 $1 files"
	echo $temp
	exit
fi
}

check_file deb
if [ -n "${temp}" ] ; then
	export RELEASE_PKG_FILE_DEB=${temp}
	export TARGET_DEB=$(echo ${RELEASE_PKG_FILE_DEB} | \
		sed -e 's:^./.*/::' -e 's:.deb$::')${LDIST}.deb
	echo "deploying $RELEASE_PKG_FILE_DEB to nightly $TARGET_DEB"
	ls -lh ${RELEASE_PKG_FILE_DEB}
else
	echo "Skipping deployment of debian package"
fi

check_file rpm
if [ -n "${temp}" ] ; then
	export RELEASE_PKG_FILE_RPM=${temp}
	export TARGET_RPM=$(echo ${RELEASE_PKG_FILE_RPM} | \
		sed -e 's:^./.*/::' -e 's:.rpm$::')${LDIST}.rpm
	echo "deploying $RELEASE_PKG_FILE_RPM to nightly $TARGET_RPM"
	ls -lh ${RELEASE_PKG_FILE_RPM}
else
	echo "Skipping deployment of rpm package"
fi

check_file tar.gz
if [  -n "${temp}"  ] ; then
	export RELEASE_PKG_FILE_TGZ=${temp}
	export TARGET_TGZ=$(echo ${RELEASE_PKG_FILE_TGZ} | \
		sed -e 's:^./.*/::' -e 's:.tar.gz$::')${LDIST}.tar.gz;
	echo "deploying $RELEASE_PKG_FILE_TGZ to $TARGET_TGZ"
	ls -lh ${RELEASE_PKG_FILE_TGZ}
else
	echo "Skipping deployment of tarball"
fi

check_file pkg
if [ -n "${temp}" ] ; then
	export RELEASE_PKG_FILE_PKG=${temp}
	export TARGET_PKG=$(echo ${RELEASE_PKG_FILE_PKG} | \
		sed -e 's:^./.*/::' -e 's:.pkg$::')${LDIST}.pkg
	echo "deploying $RELEASE_PKG_FILE_PKG to nightly $TARGET_PKG"
	ls -lh ${RELEASE_PKG_FILE_PKG}
else
	echo "Skipping deployment of OS X package"
fi