-
Notifications
You must be signed in to change notification settings - Fork 2
/
build-stable-deb.sh
executable file
·24 lines (19 loc) · 1.32 KB
/
build-stable-deb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Build and publish a package, called by github actions
# echo, exit on error/undefined vars
set -xeu
MOD='jailkit'
NAME="webmin-$MOD"
# Load module.info to get version
version=$(grep version $MOD/module.info | cut -d'=' -f2)
VERSION="${version}"
mkdir tmp
perl makemoduledeb.pl --deb-depends --licence 'GPLv3' --email '[email protected]' --allow-overwrite --target-dir tmp "$MOD" "$VERSION"
mv "tmp/${NAME}_${VERSION}_all.deb" .
# Publish to aptly
curl --user $APTLY_USER:$APTLY_PASSWD -X POST -F file=@${NAME}_${VERSION}_all.deb https://aptly.virtualmin.com/api/files/${NAME}_${VERSION}
curl --user $APTLY_USER:$APTLY_PASSWD -X POST https://aptly.virtualmin.com/api/repos/virtualmin-7-gpl/file/${NAME}_${VERSION}
curl -i --user $APTLY_USER:$APTLY_PASSWD -X PUT -H 'Content-Type: application/json' --data '{}' https://aptly.virtualmin.com/api/publish/filesystem:7-gpl:./virtualmin
curl --user $APTLY_USER:$APTLY_PASSWD -X POST -F file=@${NAME}_${VERSION}_all.deb https://aptly.virtualmin.com/api/files/${NAME}_${VERSION}
curl --user $APTLY_USER:$APTLY_PASSWD -X POST https://aptly.virtualmin.com/api/repos/virtualmin-gpl-universal/file/${NAME}_${VERSION}
curl -i --user $APTLY_USER:$APTLY_PASSWD -X PUT -H 'Content-Type: application/json' --data '{}' https://aptly.virtualmin.com/api/publish/filesystem:gpl:./virtualmin-universal