-
Notifications
You must be signed in to change notification settings - Fork 1
/
pull-hook.sh
executable file
·40 lines (34 loc) · 1.59 KB
/
pull-hook.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
#
# __ __
# / /____ ___ ____ ___ ___ _/ / This script is provided to you by https://github.com/tegonal/gt
# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft <info@tegonal.com>
# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License v. 1.2
# /___/ Please report bugs and contribute back your improvements
#
# Version: v1.1.0-SNAPSHOT
###################################
set -euo pipefail
shopt -s inherit_errexit
unset CDPATH
GT_LATEST_VERSION="v1.0.4"
if ! [[ -v dir_of_tegonal_scripts ]]; then
dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/../../../lib/tegonal-scripts/src"
source "$dir_of_tegonal_scripts/setup.sh" "$dir_of_tegonal_scripts"
fi
if ! [[ -v dir_of_github_commons ]]; then
dir_of_github_commons="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/../../../lib/tegonal-gh-commons/src"
readonly dir_of_github_commons
fi
sourceOnce "$dir_of_github_commons/gt/pull-hook-functions.sh"
sourceOnce "$dir_of_tegonal_scripts/utility/parse-fn-args.sh"
function gt_pullHook_tegonal_gh_commons_before() {
local _tag source _target
# shellcheck disable=SC2034 # is passed by name to parseFnArgs
local -ra params=(_tag source _target)
parseFnArgs params "$@"
replaceTegonalGhCommonsPlaceholders_Tegonal "$source" "gt" "$GT_LATEST_VERSION" "gt"
}
function gt_pullHook_tegonal_gh_commons_after() {
: # no op, nothing to do
}