mirror of
https://github.com/openziti/zrok.git
synced 2024-11-21 15:43:22 +01:00
Merge branch 'main' into x-forwarded-for
This commit is contained in:
commit
f47785b58a
4
.github/workflows/node-sdk.yml
vendored
4
.github/workflows/node-sdk.yml
vendored
@ -41,13 +41,13 @@ jobs:
|
||||
run: echo ::set-output name=TAG::$(git describe --tags --abbrev=0)
|
||||
|
||||
- name: Update zrok NodeJS-SDK's package.json version based on current zrok repo git tag
|
||||
if: github.ref == 'refs/heads/main'
|
||||
if: github.ref_type == 'tag'
|
||||
run: |
|
||||
cd ${{ runner.workspace }}/${{ github.event.repository.name }}/sdk/nodejs/sdk
|
||||
npm version ${{ steps.tag.outputs.TAG }} --no-git-tag-version --allow-same-version
|
||||
|
||||
- name: Setup .npmrc
|
||||
if: github.ref == 'refs/heads/main'
|
||||
if: github.ref_type == 'tag'
|
||||
# Setup .npmrc file to prepare for possible publish to npm
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
|
@ -1,5 +1,13 @@
|
||||
# CHANGELOG
|
||||
|
||||
## v0.4.30
|
||||
|
||||
FIX: Fix to the Node.js release process to properly support releasing on a tag.
|
||||
|
||||
## v0.4.29
|
||||
|
||||
FIX: Backed out an incorrect change to support a FreeBSD port in progress.
|
||||
|
||||
## v0.4.28
|
||||
|
||||
FEATURE: Node.js support for the zrok SDK (https://github.com/openziti/zrok/issues/400)
|
||||
|
@ -11,12 +11,21 @@ http:// {
|
||||
*.{$ZROK_DNS_ZONE} {
|
||||
tls {
|
||||
dns {$CADDY_DNS_PLUGIN} {$CADDY_DNS_PLUGIN_TOKEN}
|
||||
propagation_timeout 60m
|
||||
}
|
||||
|
||||
log {
|
||||
output stdout
|
||||
format console
|
||||
level DEBUG
|
||||
level INFO
|
||||
}
|
||||
|
||||
# ziti administration console uses :443 for the benefit of a web UI cert and accesses the ziti edge-management API
|
||||
@ziti host ziti.{$ZROK_DNS_ZONE}
|
||||
reverse_proxy @ziti ziti-quickstart:{$ZITI_CTRL_ADVERTISED_PORT:1280} {
|
||||
transport http {
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
}
|
||||
|
||||
@oauth host oauth.{$ZROK_DNS_ZONE}
|
||||
|
@ -5,6 +5,17 @@ set -o nounset
|
||||
set -o pipefail
|
||||
# set -o xtrace
|
||||
|
||||
_usage(){
|
||||
if (( $# )); then
|
||||
echo -e "\nERROR: unexpected arg '$1'" >&2
|
||||
fi
|
||||
echo -e "\n Usage:\n"\
|
||||
" fetch.bash\n"\
|
||||
"\n Options:\n"\
|
||||
" --quiet\t\tsuppress INFO messages\n"\
|
||||
" --verbose\t\tshow DEBUG messages\n"
|
||||
}
|
||||
|
||||
requireBashVersion() {
|
||||
if (( "${BASH_VERSION%%.*}" < 4 )); then
|
||||
echo "This script requires Bash major version 4 or greater."
|
||||
@ -13,6 +24,51 @@ requireBashVersion() {
|
||||
fi
|
||||
}
|
||||
|
||||
logger() {
|
||||
local caller="${FUNCNAME[1]}"
|
||||
|
||||
if (( $# < 1 )); then
|
||||
echo "ERROR: $caller() takes 1 or more args" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
local message="$*"
|
||||
|
||||
if [[ "$message" =~ ^r\'(.+)\'$ ]]; then
|
||||
raw_message="${BASH_REMATCH[1]}"
|
||||
message="$raw_message"
|
||||
fi
|
||||
|
||||
caller_level="${caller##log}"
|
||||
if (( DEBUG )); then
|
||||
line="${caller_level^^} ${FUNCNAME[2]}:${BASH_LINENO[1]}: $message"
|
||||
else
|
||||
line="${caller_level^^} $message"
|
||||
fi
|
||||
|
||||
if [[ -n "${raw_message-}" ]]; then
|
||||
echo -E "$line"
|
||||
else
|
||||
echo -e "$line"
|
||||
fi
|
||||
}
|
||||
|
||||
logInfo() {
|
||||
logger "$*"
|
||||
}
|
||||
|
||||
logWarn() {
|
||||
logger "$*" >&2
|
||||
}
|
||||
|
||||
logError() {
|
||||
logger "$*" >&2
|
||||
}
|
||||
|
||||
logDebug() {
|
||||
logger "$*" >&3
|
||||
}
|
||||
|
||||
fetchFile() {
|
||||
|
||||
local url="${1}"
|
||||
@ -68,7 +124,25 @@ setWorkingDir() {
|
||||
}
|
||||
|
||||
main() {
|
||||
requireBashVersion
|
||||
: "${DEBUG:=0}"
|
||||
while (( $# )); do
|
||||
case "$1" in
|
||||
-q|--quiet) exec > /dev/null
|
||||
shift
|
||||
;;
|
||||
-v|--verbose)
|
||||
DEBUG=1
|
||||
exec 3>&1
|
||||
shift
|
||||
;;
|
||||
-h|*help) _usage
|
||||
exit 0
|
||||
;;
|
||||
*) _usage "$1"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
declare -a BINS=(unzip find)
|
||||
for BIN in "${BINS[@]}"; do
|
||||
requireCommand "$BIN"
|
||||
@ -82,4 +156,5 @@ main() {
|
||||
rm zrok.zip .gitignore fetch.bash
|
||||
}
|
||||
|
||||
requireBashVersion
|
||||
main "${@}"
|
||||
|
Loading…
Reference in New Issue
Block a user