-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsandbox-php
More file actions
executable file
·46 lines (37 loc) · 996 Bytes
/
sandbox-php
File metadata and controls
executable file
·46 lines (37 loc) · 996 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -e
DIR=$(cd `dirname $0` && pwd)
WORKING_DIR="/app/openapi"
SDK_DIR="${DIR}/../sdks/php"
TARGET_DIR="${DIR}/../sandbox/php"
ARTIFACTS_DIR="${DIR}/../sandbox/php/artifacts"
mkdir -p "${ARTIFACTS_DIR}"
rm -f "${ARTIFACTS_DIR}/*.zip"
rm -f "${TARGET_DIR}/composer.lock"
rm -rf "${TARGET_DIR}/vendor"
cp -r "${SDK_DIR}" "${ARTIFACTS_DIR}/package"
cd "${ARTIFACTS_DIR}/package"
sh "${DIR}/php" php ./bin/sandbox-php.php
cd "${ARTIFACTS_DIR}/package"
zip -9 -r "${ARTIFACTS_DIR}/dropbox-sign.zip" \
./ \
-x "./.DS_Store" \
"./.gitmodules" \
"./.php-cs-fixer.cache" \
"./.phpunit.result.cache" \
"./build" \
"./openapi-config.yaml" \
"./phpunit.xml.dist" \
"./README.md" \
"./.git/*" \
"./.openapi-generator/*" \
"./bin/*" \
"./docs/*" \
"./examples/*" \
"./oas/*" \
"./templates/*" \
"./test/*" \
"./vendor/*"
cd "${ARTIFACTS_DIR}"
rm -rf "${ARTIFACTS_DIR}/package"
printf "\nDONE!\n"