Skip to content

Commit 97653d9

Browse files
committed
- Fix custom deploy scripts
1 parent eb54155 commit 97653d9

File tree

3 files changed

+41
-45
lines changed

3 files changed

+41
-45
lines changed

.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ platforms:
6060
script_location: toolchain/ci
6161
template_location: toolchain/cmake/Templates
6262
version:
63-
hotfix: 22
63+
hotfix: 23
6464
major: 0
6565
minor: 3
6666
patch: 0

cb

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -73,47 +73,45 @@ case $1 in
7373
${CONTAINER} /build/src/cb ci-build ${@:2}
7474
;;
7575
"compress-usr-dir")
76-
OUTPUT=$(realpath .)/${2}_${BUILDVARIANT}.tar.bz2
7776
INSTALL_DIR=$(realpath .)/build/install
7877

79-
echo "-- Creating $OUTPUT from $INSTALL_DIR"
80-
81-
echo "-- Current directory: $(pwd)"
78+
if [ -f "${BASE_DIR}/deploy-script.sh" ]; then
79+
echo "-- Using customized deploy script"
80+
source ${BASE_DIR}/deploy-script.sh
81+
else
82+
OUTPUT=$(realpath .)/${2}_${BUILDVARIANT}.tar.bz2
83+
echo "-- Creating $OUTPUT from $INSTALL_DIR"
8284

83-
echo "-- Source dir: ${BASE_DIR}"
84-
ls ${BASE_DIR}
85-
echo "-- Build dir: $(realpath .)/build"
86-
ls $(realpath .)/build
87-
echo "-- Install dir: ${INSTALL_DIR}"
88-
ls ${INSTALL_DIR}
85+
echo "-- Current directory: $(pwd)"
8986

90-
#echo "-- Install dir contents:"
91-
#ls -R ${INSTALL_DIR}
92-
#echo "-- Build dir contents:"
93-
#ls ${INSTALL_DIR}
94-
#echo "-- Root dir contents:"
95-
#ls -R $(realpath .)
87+
echo "-- Source dir: ${BASE_DIR}"
88+
ls ${BASE_DIR}
89+
echo "-- Build dir: $(realpath .)/build"
90+
ls $(realpath .)/build
91+
echo "-- Install dir: ${INSTALL_DIR}"
92+
ls ${INSTALL_DIR}
9693

97-
pushd ${INSTALL_DIR}
98-
case $2 in
99-
"bin")
100-
tar vcf ${OUTPUT} \
101-
--exclude=${INSTALL_DIR}/include \
102-
--exclude=${INSTALL_DIR}/lib \
103-
--exclude=${INSTALL_DIR}/share \
104-
${INSTALL_DIR}
105-
;;
106-
"libraries")
107-
tar vcf ${OUTPUT} \
108-
--exclude=${INSTALL_DIR}/bin \
109-
--exclude=${INSTALL_DIR}/packaged \
110-
${INSTALL_DIR}
111-
;;
112-
*)
113-
echo "-- Unhandled case $2"
114-
;;
115-
esac
116-
popd
94+
pushd ${INSTALL_DIR}
95+
case $2 in
96+
"bin")
97+
tar cvf ${OUTPUT} \
98+
--exclude=${INSTALL_DIR}/include \
99+
--exclude=${INSTALL_DIR}/lib \
100+
--exclude=${INSTALL_DIR}/share \
101+
${INSTALL_DIR}
102+
;;
103+
"libraries")
104+
tar cvf ${OUTPUT} \
105+
--exclude=${INSTALL_DIR}/bin \
106+
--exclude=${INSTALL_DIR}/packaged \
107+
${INSTALL_DIR}
108+
;;
109+
*)
110+
echo "-- Unhandled case $2"
111+
;;
112+
esac
113+
popd
114+
fi
117115
;;
118116
"push-asset")
119117
TAG_NAME=$(github_api list tag "$TRAVIS_REPO_SLUG" "^$TRAVIS_COMMIT$" | cut -d'|' -f 2)

deploy-script.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
ASSETS=(openal bullet assimp squish glslang shaderc spirvcross sdl2 openssl ffmpeg compressonator zlib lz4 zstd discord-rpc)
22

3-
INSTALL_BASE_DIR=$BUILD_DIR/$BUILDVARIANT/install
4-
53
for a in ${ASSETS[@]}; do
6-
ASSET="${PWD}/${a}_${BUILDVARIANT}.tar.gz"
4+
ASSET="${PWD}/${a}_${BUILDVARIANT}.tar.bz2"
75

8-
if [[ ! -d "$INSTALL_BASE_DIR/$a" ]]; then
6+
if [[ ! -d "$INSTALL_DIR/$a" ]]; then
97
continue
108
fi
119

12-
pushd $INSTALL_BASE_DIR/$a
13-
tar -zcvf "$ASSET" *
14-
popd
10+
echo "-- Packaging ${a} => ${ASSET}"
1511

16-
deploy_asset "$(basename ${ASSET})" ${TARGET_SLUG}
12+
pushd $INSTALL_DIR/$a
13+
tar -cvf "$ASSET" *
14+
popd
1715
done

0 commit comments

Comments
 (0)