-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
32 lines (26 loc) · 902 Bytes
/
release.sh
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
31
32
#!/bin/bash
set -e
WORKDIR=$(echo $PWD)
mkdir -p ${WORKDIR}/dist
mkdir -p ${WORKDIR}/build
rm -fr ${WORKDIR}/build
mkdir -p ${WORKDIR}/build
cd ${WORKDIR}/build
git clone https://github.com/wp-quality/ads-made-simple
cd ${WORKDIR}/build/ads-made-simple
VERSION=$(cat composer.json | grep version | head -n 1 | sed 's/.*version//' | tr -d $'\n\r\t ,":=\'')
composer install --no-dev --prefer-dist
cd ${WORKDIR}/build
rm -f ../dist/ads-made-simple-${VERSION}.zip
zip -r ../dist/ads-made-simple-${VERSION}.zip ads-made-simple \
-x "ads-made-simple/.git/*" \
"ads-made-simple/.idea/*" \
"ads-made-simple/dist/*" \
"ads-made-simple/build/*" \
"ads-made-simple/.*" \
"ads-made-simple/Dockerfile" \
"ads-made-simple/composer.*" \
"ads-made-simple/wp-content/*" \
"ads-made-simple/*.yml" \
"ads-made-simple/*.sh"
rm -fr ${WORKDIR}/build