File tree Expand file tree Collapse file tree 12 files changed +90
-32
lines changed Expand file tree Collapse file tree 12 files changed +90
-32
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ #
4
+ # Build all containers with one command
5
+ #
6
+ CONTAINER_LIST=" build game dev"
7
+ for CONTAINER in $CONTAINER_LIST ; do
8
+ echo ====== Running all steps for container: $CONTAINER
9
+ pushd $CONTAINER
10
+ ./all.sh
11
+ popd
12
+ echo ====== Finished all steps for container: $CONTAINER
13
+ done
14
+
15
+ echo COMPLETED build of $CONTAINER_LIST
Original file line number Diff line number Diff line change
1
+ api-config.sh
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- VERSION=3.16.1
3
- PACKAGE=s2client-api-${VERSION} .tgz
2
+
3
+ . api-config.sh
4
+
5
+ PACKAGE=s2client-api-${GAME_VERSION} .tgz
4
6
5
7
echo " ===================================="
6
8
echo " Building package ${PACKAGE} "
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- VERSION=3.16.1
3
+ SCRIPT_PATH=${0%/* }
4
+ . ${SCRIPT_PATH} /../config.sh
4
5
5
6
# Build the API artifacts in the build-mount folder
6
7
docker run -it -v build-mount:/build-mount --entrypoint=" /s2client-api/api-all.sh" s2client-api
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ #
3
4
# This clones a clean copy of the repo
5
+ #
4
6
mkdir -p downloads
7
+
5
8
pushd downloads
6
- rm -rf s2client-api
7
- git clone --recursive https://github.com/Blizzard/s2client-api
9
+
10
+ if [ -d s2client-api ]; then
11
+ cd s2client-api && git pull -r
12
+ else
13
+ git clone --recursive https://github.com/Blizzard/s2client-api
14
+ fi
15
+
8
16
popd
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # This builds the container
4
- IMGNAME =s2client-api
3
+ # This builds the container for building the API code
4
+ IMAGE_NAME =s2client-api
5
5
SCRIPT_PATH=${0%/* }
6
6
7
- echo ${IMGNAME} docker image building using ${SCRIPT_PATH} /Dockerfile
8
- docker build ${SCRIPT_PATH} -t ${IMGNAME}
7
+ echo Copying config.sh for current version
8
+ cp ${SCRIPT_PATH} /../config.sh ${SCRIPT_PATH} /api-config.sh
9
+
10
+ echo ${IMAGE_NAME} docker image building using ${SCRIPT_PATH} /Dockerfile
11
+ docker build ${SCRIPT_PATH} -t ${IMAGE_NAME}
Original file line number Diff line number Diff line change
1
+
2
+ #
3
+ # Common variables used by scripts for building and controlling
4
+ # containers
5
+ #
6
+ GAME_VERSION=3.16.1
7
+
8
+ #
9
+ # Common command replacements
10
+ #
11
+ UNZIP_CMD=" unzip -Piagreetotheeula"
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # This builds the container
4
- IMGNAME=s2client-dev
3
+ # This builds the container that could be used to clone the API and work on
4
+ # local changes
5
+ IMAGE_NAME=s2client-dev
5
6
SCRIPT_PATH=${0%/* }
6
7
7
- echo ${IMGNAME } docker image building using ${SCRIPT_PATH} /Dockerfile
8
- docker build ${SCRIPT_PATH} -t ${IMGNAME }
8
+ echo ${IMAGE_NAME } docker image building using ${SCRIPT_PATH} /Dockerfile
9
+ docker build ${SCRIPT_PATH} -t ${IMAGE_NAME }
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- VERSION=3.16.1
3
+ SCRIPT_PATH=${0%/* }
4
+ . ${SCRIPT_PATH} /../config.sh
4
5
6
+ WGET_CMD=" wget --timestamping --continue"
7
+
8
+ #
5
9
# This downloads zip files for current version
10
+ #
6
11
mkdir -p downloads/
12
+
7
13
pushd downloads
8
- wget -c http://blzdistsc2-a.akamaihd.net/Linux/SC2.${VERSION} .zip
9
- wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
10
- wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip
11
- wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3.zip
12
- wget -c http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip
14
+
15
+ ${WGET_CMD} http://blzdistsc2-a.akamaihd.net/Linux/SC2.${GAME_VERSION} .zip
16
+ ${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
17
+ ${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip
18
+ ${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3.zip
19
+ ${WGET_CMD} http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip
20
+
13
21
popd
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- # This builds the container
4
- IMGNAME =s2client-game
3
+ # This builds the container for running the game
4
+ IMAGE_NAME =s2client-game
5
5
SCRIPT_PATH=${0%/* }
6
6
7
- echo ${IMGNAME } docker image building using ${SCRIPT_PATH} /Dockerfile
8
- docker build ${SCRIPT_PATH} -t ${IMGNAME }
7
+ echo ${IMAGE_NAME } docker image building using ${SCRIPT_PATH} /Dockerfile
8
+ docker build ${SCRIPT_PATH} -t ${IMAGE_NAME }
You can’t perform that action at this time.
0 commit comments