1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/build.sh

35 lines
690 B
Bash
Raw Normal View History

2016-03-15 16:28:38 +01:00
#!/bin/bash
VERSION=`cat VERSION`
PACKAGENAME="movim-${VERSION}"
package() {
# Exports the project's package with dependencies
PACKAGEZIP="${PACKAGENAME}.zip"
# OK, we export the code. $1 is the version number.
bzr export $PACKAGENAME
cd $PACKAGENAME
curl -sS https://getcomposer.org/installer | php
php composer.phar install
rm composer.*
# Compressing
cd ..
zip --quiet -r $PACKAGEZIP $PACKAGENAME
# Deleting useless folder
rm -rf $PACKAGENAME
# Signing, will create a $packagezip.sign file. Important stuff.
gpg --armor --sign --detach-sign $PACKAGEZIP
}
# Doing the job
case $1 in
"package") package;;
esac