Add buildscript

pull/6/head
Paróczai Olivér 2021-10-16 21:46:42 +00:00 zatwierdzone przez GitHub
rodzic 4fe591a887
commit 486b5613ad
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 28 dodań i 0 usunięć

28
MakePackage.sh 100644
Wyświetl plik

@ -0,0 +1,28 @@
#!/bin/bash
#Automatic buildscript for Nextcloud apps
#Made by @OliverParoczai
#Requires git, xmlstarlet, tar, and optionally openssl
REPOURL="https://github.com/OliverParoczai/nextcloud-unroundedcorners.git" #official repo, change if forked
SIGN=FALSE #Sign the file for uploading to the official appstore
SIGNCERT=~/.nextcloud/certificates/unroundedcorners.key #The location of the key
mkdir tmp
echo "Cloning $REPOURL"
git clone -q $REPOURL tmp/unroundedcorners/
VERSION=$(xmlstarlet sel -T -t -m '//info/version' -v . -n tmp/unroundedcorners/appinfo/info.xml)
echo "Version is ${VERSION}"
echo "Starting compression"
tar --exclude='differences.png' --exclude=".git" -czf unroundedcorners-v${VERSION}.tar.gz -C tmp unroundedcorners/
rm -rf tmp
if [ $SIGN ]; then
echo ""
echo "The signature:"
echo ""
openssl dgst -sha512 -sign $SIGNCERT unroundedcorners-v${VERSION}.tar.gz | openssl base64
echo ""
fi