mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
f8bd506326
* [FEATURE] Embed static assets in Go binary * Refactor/consolidate code and specify public_html via configuration * Update docs and config template for assets * Update AUR package pre-requisites and systemd unit * Include static assets as Buildkite and GitHub artifacts * Remove references to PUBLIC_DIR * Only serve assets via embedded filesystem and remove configuration references * Update authelia-scripts helper to build the embedded filesystem * Mock the embedded filesystem for unit tests Add to gitignore to ensure this isn't overwritten. * Move go:generate to satisfy linter
43 lines
945 B
Bash
43 lines
945 B
Bash
#!/bin/bash
|
|
|
|
export PATH=$PATH:./cmd/authelia-scripts/:./.buildkite/steps/:$GOPATH/bin:./web/node_modules/.bin:/tmp
|
|
|
|
if [[ -z "$OLD_PS1" ]]; then
|
|
OLD_PS1="$PS1"
|
|
export PS1="(authelia) $PS1"
|
|
fi
|
|
|
|
if [[ $(id -u) = 0 ]]; then
|
|
echo "Cannot run as root, defaulting to UID 1000"
|
|
export USER_ID=1000
|
|
elif [[ $(uname) == "Darwin" ]]; then
|
|
echo "Normalise for OSX, defaulting to UID 1000"
|
|
export USER_ID=1000
|
|
else
|
|
export USER_ID=$(id -u)
|
|
fi
|
|
|
|
if [[ $(id -g) = 0 ]]; then
|
|
echo "Cannot run as root, defaulting to GID 1000"
|
|
export GROUP_ID=1000
|
|
elif [[ $(uname) == "Darwin" ]]; then
|
|
echo "Normalise for OSX, defaulting to GID 1000"
|
|
export GROUP_ID=1000
|
|
else
|
|
export GROUP_ID=$(id -g)
|
|
fi
|
|
|
|
if [[ "$CI" == "true" ]]; then
|
|
true
|
|
else
|
|
export CI=false
|
|
fi
|
|
|
|
echo "[BOOTSTRAP] Checking if Go is installed..."
|
|
if [[ ! -x "$(command -v go)" ]];
|
|
then
|
|
echo "[ERROR] You must install Go on your machine.";
|
|
return
|
|
fi
|
|
|
|
authelia-scripts bootstrap |