summaryrefslogtreecommitdiff
path: root/scripts/make-archive.sh
blob: 0993092bf7b4bc708852e554270938b57966e7d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

VERSION=$1
APP="kanboard"

cd /tmp
rm -rf /tmp/$APP /tmp/$APP-*.zip 2>/dev/null

git clone --depth 1 https://github.com/fguillot/$APP.git

rm -rf $APP/data/*.sqlite \
      $APP/.git $APP/.gitignore \
      $APP/scripts \
      $APP/tests \
      $APP/Vagrantfile \
      $APP/.*.yml \
      $APP/README.markdown \
      $APP/docs \
      $APP/Dockerfile

sed -i.bak s/master/$VERSION/g $APP/app/constants.php && rm -f $APP/app/*.bak
zip -r $APP-$VERSION.zip $APP

mv $APP-$VERSION.zip ~/Devel/websites/$APP

cd ~/Devel/websites/$APP/
unlink $APP-latest.zip
ln -s $APP-$VERSION.zip $APP-latest.zip

rm -rf /tmp/$APP 2>/dev/null