-
Notifications
You must be signed in to change notification settings - Fork 7
fix(scripts): fix download-env-vars
#6048
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| #!/usr/bin/env bash | ||
| # Defines (and exports) a handful of the more widely supported ANSI control sequences for | ||
| # manipulating font and colour when writing to stdout. Honours the NO_COLOR environment variable if | ||
| # it is set. | ||
| # | ||
| # EXAMPLE USAGE | ||
| # source "path/to/ansiControlSequence.sh" | ||
| # echo -e "${BOLD}${WHITE}${ON_RED}ERROR${RESET} File does not exist." | ||
| # printf 'See %bhttp://bes.au%b for more info.\n' "$MAGENTA" "$RESET" | ||
| # | ||
| # REMARKS | ||
| # - If using echo, remember to use -e. Otherwise, the ANSI codes will be printed literally. | ||
| # - Avoid using variables in the printf format string: https://github.com/koalaman/shellcheck/wiki/SC2059 | ||
| # | ||
| # REFERENCE | ||
| # https://en.wikipedia.org/wiki/ANSI_escape_code | ||
|
|
||
| # ANSI control sequences | ||
|
|
||
| export CURSOR_UP='\033[A' | ||
| export CURSOR_DOWN='\033[B' | ||
| export CURSOR_FORWARD='\033[C' | ||
| export CURSOR_BACK='\033[D' | ||
| export CURSOR_NEXT_LINE='\033[E' | ||
| export CURSOR_PREV_LINE='\033[F' | ||
| export CURSOR_START_OF_LINE='\033[G' | ||
| export CLEAR_LINE="\033[2K${CURSOR_START_OF_LINE}" | ||
|
|
||
| # Select graphic rendition (SGR) parameters | ||
|
|
||
| if [[ $NO_COLOR != '' ]]; then | ||
| # See https://no-color.org | ||
| export RESET='' | ||
| export BOLD='' | ||
| export UNDERLINE='' | ||
| export BLACK='' | ||
| export RED='' | ||
| export GREEN='' | ||
| export YELLOW='' | ||
| export BLUE='' | ||
| export MAGENTA='' | ||
| export CYAN='' | ||
| export WHITE='' | ||
| export ON_BLACK='' | ||
| export ON_RED='' | ||
| export ON_GREEN='' | ||
| export ON_YELLOW='' | ||
| export ON_BLUE='' | ||
| export ON_MAGENTA='' | ||
| export ON_CYAN='' | ||
| export ON_WHITE='' | ||
| else | ||
| export RESET='\033[m' | ||
| export BOLD='\033[1m' | ||
| export UNDERLINE='\033[4m' | ||
| export BLACK='\033[30m' | ||
| export RED='\033[31m' | ||
| export GREEN='\033[32m' | ||
| export YELLOW='\033[33m' | ||
| export BLUE='\033[34m' | ||
| export MAGENTA='\033[35m' | ||
| export CYAN='\033[36m' | ||
| export WHITE='\033[37m' | ||
| export ON_BLACK='\033[40m' | ||
| export ON_RED='\033[41m' | ||
| export ON_GREEN='\033[42m' | ||
| export ON_YELLOW='\033[43m' | ||
| export ON_BLUE='\033[44m' | ||
| export ON_MAGENTA='\033[45m' | ||
| export ON_CYAN='\033[46m' | ||
| export ON_WHITE='\033[47m' | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,24 @@ | ||
| #!/bin/bash -e | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| DEPLOYABLE_PACKAGES=( | ||
| 'admin-panel' | ||
| 'lesmis' | ||
| 'psss' | ||
| 'datatrak-web' | ||
| 'tupaia-web' | ||
| 'central-server' | ||
| 'data-table-server' | ||
| 'datatrak-web-server' | ||
| 'entity-server' | ||
| 'lesmis-server' | ||
| 'meditrak-app-server' | ||
| 'psss-server' | ||
| 'report-server' | ||
| 'tupaia-web-server' | ||
| 'web-config-server' | ||
| 'admin-panel-server' # admin-panel-server last as it depends on report-server | ||
| ) | ||
| echo "${DEPLOYABLE_PACKAGES[@]}" | ||
|
|
||
| echo "admin-panel" "lesmis" "psss" "datatrak-web" "tupaia-web" "central-server" "data-table-server" "datatrak-web-server" "entity-server" "lesmis-server" "meditrak-app-server" "psss-server" "report-server" "tupaia-web-server" "web-config-server" "admin-panel-server" # admin-panel-server last as it depends on report-server | ||
| exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| #!/bin/bash -e | ||
| #!/usr/bin/env bash | ||
| set -e | ||
|
|
||
| DIR=$(dirname "$0") | ||
|
|
||
| # packages with .env files are (currently) all deployable, plus auth, data-api, and database | ||
| PACKAGES=$(${DIR}/getDeployablePackages.sh) | ||
| PACKAGES+=" data-api viz-test-tool" | ||
| echo $PACKAGES | ||
| # Packages with .env files are (currently) all deployable, plus auth, data-api, and database | ||
| PACKAGES=$("$DIR/getDeployablePackages.sh") | ||
| PACKAGES+=('data-api' 'viz-test-tool') | ||
| echo "${PACKAGES[@]}" | ||
|
|
||
| exit 0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more direct way of checking for existence of a file, and saves spinning up a child process for
findCould also have been
[[ ]] && load_env_file..., but theifis a bit more explicit