Skip to content

Commit b93be51

Browse files
dl_starter_projects.sh takes starter project names as parameters instead of a constant.
Signed-off-by: Michael Valdron <[email protected]>
1 parent 4eadc6f commit b93be51

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ COPY index/ /index
2222
COPY tests/registry /registry
2323

2424
# Download offline starter projects
25-
RUN bash /build-tools/dl_starter_projects.sh
25+
RUN bash /build-tools/dl_starter_projects.sh go-starter
2626

2727
# Run the registry build tools
2828
RUN /build-tools/build.sh /registry /build

build-tools/dl_starter_projects.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/bin/bash
22

3+
if [ -z "$@" ]
4+
then
5+
echo "No starter projects specified."
6+
exit 0
7+
fi
8+
39
# Path of stacks directory in the registry
410
STACKS_DIR=/registry/stacks
511
# List of starter projects to use offline
6-
OFFLINE_STARTER_PROJECTS=("go-starter")
12+
offline_starter_projects=( "$@" )
713

814
# Downloads a starter project from a remote git repository and packages it as a zip archive
915
# to be used as an offline resource.
@@ -35,7 +41,7 @@ download_zip_starter_project() {
3541
read -r -a stacks <<< "$(ls ${STACKS_DIR} | tr '\n' ' ')"
3642

3743
echo "Downloading offline starter projects.."
38-
for starter_project in ${OFFLINE_STARTER_PROJECTS[@]}
44+
for starter_project in ${offline_starter_projects[@]}
3945
do
4046
for stack in ${stacks[@]}
4147
do

0 commit comments

Comments
 (0)