Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Use a variable as a prefix for the codewind index stack display names #343

Merged
merged 1 commit into from
Sep 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ci/create_codewind_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

base_dir = os.path.abspath(os.path.dirname(sys.argv[0]))

displayNamePrefix = "Appsody"
if len(sys.argv) > 1:
displayNamePrefix = sys.argv[1]

# directory to store assets for test or release
assets_dir = base_dir + "/assets/"

Expand All @@ -31,7 +35,7 @@

# populate stack details
res = (OrderedDict([
("displayName", "Appsody " + item['name'] + template + " template"),
("displayName", displayNamePrefix + " " + item['name'] + template + " template"),
("description", item['description']),
("language", item['language']),
("projectType", "appsodyExtension"),
Expand Down
8 changes: 8 additions & 0 deletions ci/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ mkdir -p $prefetch_dir
# Build the Codewind index when the value is 'true' (requires PyYaml)
# export CODEWIND_INDEX

# Prefix to be used on the display name of the stack in the Codewind index file
# export DISPLAY_NAME_PREFIX="Appsody"

# Specify a wrapper where required for long-running commands
CI_WAIT_FOR=

Expand Down Expand Up @@ -171,6 +174,11 @@ then
fi
fi

if [ -z "$DISPLAY_NAME_PREFIX" ]
then
export DISPLAY_NAME_PREFIX="Appsody"
fi

image_build() {
local cmd="docker build"
if [ "$USE_BUILDAH" == "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ do
done

if [ "$CODEWIND_INDEX" == "true" ]; then
python3 $script_dir/create_codewind_index.py
python3 $script_dir/create_codewind_index.py $DISPLAY_NAME_PREFIX
fi

# expose an extension point for running after main 'package' processing
Expand Down