Add buildscript (PR #6, from @OliverParoczai)

pull/7/head
Paróczai Olivér 2021-10-16 21:51:33 +00:00 zatwierdzone przez GitHub
commit 5f0403f049
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 34 dodań i 0 usunięć

Wyświetl plik

@ -25,3 +25,9 @@ For the CSS we used variables that automatically changed all "pill"-style button
# Usage with Custom CSS
To be updated at a later time
# Packaging using the buildscript
There is a bash script for packaging the application included in the 'code' directory. It makes a tar file using the required file structure, and can optionally sign it.
The script doesn't require root permissions, just a few packages: ```git, xmlstarlet, tar```

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='code' --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