1
+ #! /bin/bash
2
+
3
+ # Utility adapted from the tool for creating SMW tarballs
4
+ # By Jeroen De Dauw < [email protected] >
5
+ #
6
+ # @copyright (C) 2016, Stephan Gambke
7
+ # @license GNU General Public License, version 2 (or any later version)
8
+ #
9
+ # This software is free software; you can redistribute it and/or
10
+ # modify it under the terms of the GNU General Public License
11
+ # as published by the Free Software Foundation; either version 2
12
+ # of the License, or (at your option) any later version.
13
+ # This software is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ # You should have received a copy of the GNU General Public License
18
+ # along with this program; if not, see <http://www.gnu.org/licenses/>.
19
+
20
+ # Parameters:
21
+ # $1: version fed to composer, defaults to dev-master
22
+ # $2: version used in the tarball name, defaults to $1
23
+
24
+ COMPOSER_VERSION=" $1 "
25
+ VERSION=" $2 "
26
+ if [ " $COMPOSER_VERSION " == " " ]; then
27
+ COMPOSER_VERSION=" dev-master"
28
+ fi
29
+
30
+ if [ " $VERSION " == " " ]; then
31
+ VERSION=$COMPOSER_VERSION
32
+ fi
33
+
34
+ NAME=" SimpleBatchUpload $VERSION (+dependencies)"
35
+ DIR=" SimpleBatchUpload"
36
+
37
+ BUILD_DIR=" build-$VERSION "
38
+
39
+ rm -rf $BUILD_DIR
40
+ mkdir $BUILD_DIR
41
+ cd $BUILD_DIR
42
+
43
+ composer create-project mediawiki/simple-batch-upload $DIR $COMPOSER_VERSION --stability dev --prefer-dist --no-dev --ignore-platform-reqs --no-install
44
+
45
+ cd $DIR
46
+ composer install --prefer-dist --no-dev --ignore-platform-reqs --optimize-autoloader
47
+ cd -
48
+
49
+ zip -qro9 " $NAME .zip" $DIR
50
+ tar -czf " $NAME .tar.gz" $DIR
51
+
52
+ cd ..
53
+ set -x
54
+ ls -lap $BUILD_DIR
0 commit comments