mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
34 lines
690 B
Bash
Executable file
34 lines
690 B
Bash
Executable file
#!/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
|