Skip to content

Commit

Permalink
Merge pull request #221 from tegonal-bot/gt/update/tegonal-scripts
Browse files Browse the repository at this point in the history
update files of remote tegonal-scripts to version v4.1.0 via gt
  • Loading branch information
robstoll authored Oct 25, 2024
2 parents 6e4864e + 79f0c04 commit a1f96ca
Show file tree
Hide file tree
Showing 41 changed files with 139 additions and 116 deletions.
53 changes: 26 additions & 27 deletions .gt/remotes/tegonal-scripts/public-keys/signing-key.public.asc
Original file line number Diff line number Diff line change
Expand Up @@ -59,31 +59,30 @@ AGeerkJ3XN7/ttUFe6sa0vPxbJX+S8CApFzo2smKaL5B+S0UI92G4MvZXaS65i0u
Ow5JSrpfZvvz1L6+6CEPKdTyC+S2HeLpUHzTFnQBFwZimO2wTrLeMQfoW5ZT75Vz
8FBqF9w01JC9hmsSA4n4MEsM3yvQTHkAVY4DoTEtlCJUK9kYWh6SorM3DpEQLVjh
Xzw1QOiyOfzDQFP0l24440kaGEvP+w8809Rd0dNsSZXtbtMN/b6lgTKZ2xC37Zkh
Qvs6Hs5sx8Se83/Lyh8gO9At3U6amQz0bTzy3Pa3U3UpABEBAAGJBHIEGAEKACYW
IQQU5W1MPaI/rfVKQONrgrsr7O4ERwUCYrMlyAIbAgUJAeEzgAJACRBrgrsr7O4E
R8F0IAQZAQoAHRYhBJQHlYGGZpXeqdTJWJRf5hWQTlyFBQJisyXIAAoJEJRf5hWQ
TlyFTLIP/i44iSXGBT8gRncDddfPWEEWqjVl/W5q3VC1ow5FKEDk3Fe91/yU/iCN
0AMhmIFkAdZckZJAm5uRL04e2j3L3sHqbEcpXNDUzwSPR9zSwYDrk01b9QGhUFjV
vYmhvL6MfFquDaWttcllOAoRBt4SJDgBtY2mtTpZlH9OgJPHP4ROgxqRnCdvVIBS
JXRvCJxRTSVE+8xzjjTZULxDkzGUMBVv9UM/9PfFZOBvlO5py9iuVfX5rY9+/YV1
n9XG5ZwZbYqi3K80R9NkNhiZLsLU9rXA0/OYEF6DhmepngxmYabdJTwH3dSXOKHS
6aX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LOpsqi8V0MMHMXEeO+36MFZN/6gd7aOOIXKF9Ro7eJ/YL/qpb
am6ZNHUDIVtvUJX8YU2I5vW/4BNt1/WlH36lk+ssqILlaoxncGkhr2JITZjSyecd
EUaR64s9Z4MSzTu3gzRn0G/14gowjeLqqmbibxx076OOPXbbsp5OxfIloCfD98hb
o0W1dncCumf6ysyoI6cDUs1JSVa10we45GIW3LmSBgUpOBDqlg6iGSVeigu4Q3IT
sTKbPQZdLBaT3zTve7cLmhvAnCoeMZ9oSM+vL6byXGxog7hSCajVWcnQhB/jFqsW
kfysIT2WL8hOfolv5H9htLFBmILcKPlQnmuLCWpH6wg5tDEYd0dPEXM2Ba+84zts
7r2d5Kp7DSiqCe0qCxS8ZoVMlw0VQD6NGYWm2HHo64s0x3xDiXbzwGHfJIXStxoG
GE/c/KspLQqPdTPiOJ37Ym1XeO8yt/tO6jm04TC8FfhkTMkZTtKswotkery6uv7T
0u7l6fVcw67qTNi+ReIhqbBkZNajg60dPlLw
=oNyI
-----END PGP PUBLIC KEY BLOCK-----

Binary file not shown.
76 changes: 38 additions & 38 deletions .gt/remotes/tegonal-scripts/pulled.tsv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/ci/install-shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# function which searches for *.sh files within defined paths (directories or a single *.sh) and
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/ci/install-shellspec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# function which searches for *.sh files within defined paths (directories or a single *.sh) and
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/qa/run-shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# function which searches for *.sh files within defined paths (directories or a single *.sh) and
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/qa/run-shellspec-if-installed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# function which calls shellspec in case the command exists and otherwise prints a warning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License 1.2
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# constants intended to be sourced into a function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# intended to be sourced into a function which expects params version and nextVersion
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Checks that releasing a certain version (creating a corresponding git tag) makes sense: We check:
Expand Down Expand Up @@ -34,7 +34,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Prepare the next dev cycle for files based on conventions:
Expand Down Expand Up @@ -60,7 +60,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Prepares the next dev cycle based on conventions:
Expand Down Expand Up @@ -61,7 +61,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/release-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Releasing files based on conventions:
Expand Down Expand Up @@ -75,7 +75,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/release-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Defines a release process template where some conventions are defined:
Expand Down Expand Up @@ -80,7 +80,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Shows or hides the sneak peek banner
Expand All @@ -32,7 +32,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/toggle-sections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Searches for <!-- for main --> ... <!-- for main end --> as well as for
Expand Down Expand Up @@ -36,7 +36,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/update-version-README.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Replaces the version used in download badge(s) and in the sneak peek banner
Expand All @@ -32,7 +32,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Carry out some common update version steps either during releasing or in preparing the next dev cycle (indicated via
Expand Down Expand Up @@ -56,7 +56,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Updates the placeholder of all labels named `Affected Version` in issue templates.
Expand All @@ -32,7 +32,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
4 changes: 2 additions & 2 deletions lib/tegonal-scripts/src/releasing/update-version-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Updates the version which is placed before the `Description` section in bash files (line 8 in this file).
Expand All @@ -32,7 +32,7 @@
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
export TEGONAL_SCRIPTS_VERSION='v4.0.0'
export TEGONAL_SCRIPTS_VERSION='v4.1.0'

if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.."
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# script which should be sourced and sets up variables and functions for the scripts
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/utility/array-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# utility functions for dealing with arrays
Expand Down
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/utility/ask.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Utility functions to ask the user something via input.
Expand Down
26 changes: 25 additions & 1 deletion lib/tegonal-scripts/src/utility/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Functions to check declarations
Expand Down Expand Up @@ -74,6 +74,11 @@
# exitIfVariablesNotDeclared myVar4 myVar5 # would exit because myVar5 is not set
# echo "myVar4 $myVar4"
#
# declare currentDir
# currentDir=$(pwd)
# checkIfPathNamedIsOutsideOf "$myVar4" "source directory" "$currentDir" # same as exitIfPathNamedIsOutsideOf if set -e has an effect on this line
# exitIfPathNamedIsOutsideOf "$myVar4/plugins.txt" "plugins" "$currentDir"
#
###################################
set -euo pipefail
shopt -s inherit_errexit
Expand Down Expand Up @@ -310,3 +315,22 @@ function exitIfVariablesNotDeclared() {
fi
done
}

function checkIfPathNamedIsOutsideOf() {
local path name parentDirectory
# shellcheck disable=SC2034 # is passed by name to parseFnArgs
local -ra params=(path name parentDirectory)
parseFnArgs params "$@"

local pathAbsolute parentDirectoryAbsolute
pathAbsolute="$(realpath "$path")"
parentDirectoryAbsolute="$(realpath "$parentDirectory")"
if ! [[ "$pathAbsolute" == "$parentDirectoryAbsolute"* ]]; then
returnDying "the given \033[0;36m%s\033[0m %s is outside of %s" "$name" "$pathAbsolute" "$parentDirectory" || return $?
fi
}

function exitIfPathNamedIsOutsideOf() {
# shellcheck disable=SC2310 # we are aware of that || will disable set -e for checkIfPathNamedIsOutsideOf
checkIfPathNamedIsOutsideOf "$@" || exit $?
}
2 changes: 1 addition & 1 deletion lib/tegonal-scripts/src/utility/cleanups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0
# /___/ Please report bugs and contribute back your improvements
#
# Version: v4.0.0
# Version: v4.1.0
####### Description #############
#
# Functions which help in doing cleanup in e.g. scripts/cleanup-on-push-to-main.sh
Expand Down
Loading

0 comments on commit a1f96ca

Please sign in to comment.