Skip to content

Commit

Permalink
shellcheck & shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dmihalcik-virtru committed May 6, 2024
1 parent 87566fb commit 01c311c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/roundtrip/config-demo-idp.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

set -x

: "${KC_VERSION:=24.0.3}"
Expand All @@ -6,12 +8,22 @@ if ! which kcadm.sh; then
KCADM_URL=https://github.com/keycloak/keycloak/releases/download/${KC_VERSION}/keycloak-${KC_VERSION}.zip
echo "DOWNLOADING ${KCADM_URL}"
if ! curl --output kc.zip --fail --location "${KCADM_URL}"; then
echo "DOWNLOADING ${KCADM_URL}"
echo "[ERROR] Failed to download ${KCADM_URL}"
exit 3
fi
ls -l
unzip ./kc.zip -d keycloak-${KC_VERSION}
if ! unzip ./kc.zip; then
echo "[ERROR] Failed to unzip file from ${KCADM_URL}"
exit 3
fi
ls -l
export PATH=$PATH:$(pwd)/keycloak-${KC_VERSION}/bin
ls -l "$(pwd)/keycloak-${KC_VERSION}/bin"
PATH=$PATH:"$(pwd)/keycloak-${KC_VERSION}/bin"
export PATH
if ! which kcadm.sh; then
echo "[ERROR] Failed to find kcadm.sh"
exit 3
fi
fi

kcadm.sh config credentials --server http://localhost:65432/auth --realm master --user admin <<EOF
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/roundtrip/wait-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ _init_webapp() {
done
}


_init_platform() {
output=$(mktemp)
if ! cd "${APP_DIR}"; then
Expand Down Expand Up @@ -139,8 +138,6 @@ if [ $1 = platform ]; then
fi
fi



if ! cd "${WEB_APP_DIR}"; then
echo "[ERROR] Couldn't cd to web-app dir, [${WEB_APP_DIR}]"
exit 2
Expand Down

0 comments on commit 01c311c

Please sign in to comment.