From bd8841420682e8fecb6afc7fd0534541a8c4768b Mon Sep 17 00:00:00 2001 From: Caio Moritz Ronchi Date: Mon, 19 Dec 2016 15:10:23 +0100 Subject: [PATCH] new-issue command (closes #34) --- plugins/base/bin/cmd/new-issue_pre.sh | 21 +++++++++++++++++++++ plugins/base/bin/hooks/plugin_pre.sh | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 plugins/base/bin/cmd/new-issue_pre.sh create mode 100644 plugins/base/bin/hooks/plugin_pre.sh diff --git a/plugins/base/bin/cmd/new-issue_pre.sh b/plugins/base/bin/cmd/new-issue_pre.sh new file mode 100644 index 0000000..ea60a56 --- /dev/null +++ b/plugins/base/bin/cmd/new-issue_pre.sh @@ -0,0 +1,21 @@ +CMD_DESCRIPTION="Prints the GitHub issue Markdown template." + +function _itemized_plugins_name_and_version() +{ + for dir_name in $(ls $ATHENA_PLGS_DIR); do + local version="$(cat $ATHENA_PLGS_DIR/$dir_name/version.txt)" + echo "${dir_name},${version}" + done +} + +# check that docker is up or exit with a message +athena.docker >/dev/null + +echo "**Athena Environment**" +echo "\`\`\`" +echo "OS: $(uname -a)" +echo "Athena version: $ATHENA_PLG_IMAGE_VERSION" +echo "Plugins: " ; _itemized_plugins_name_and_version | awk -F, '{ print " - " $1 " [" $2 "]" }' +echo "Images: " ; athena.docker images | grep "$ATHENA_PLG_IMAGE_NAME" | awk -F" " '{ print " - " $1 " ["$2"] " $3 }' +echo "Running containers: " ; athena.docker.list_athena_containers | awk -F "->" '{ print " - " $1 }' +echo "\`\`\`" diff --git a/plugins/base/bin/hooks/plugin_pre.sh b/plugins/base/bin/hooks/plugin_pre.sh new file mode 100644 index 0000000..315acdb --- /dev/null +++ b/plugins/base/bin/hooks/plugin_pre.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ "${args[@]}" == "new-issue" ]; then + athena.os._set_no_logo 1 +fi