mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-22 08:23:40 +00:00
Only export dotenv file if its exist
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
parent
c6bcc8722c
commit
4022a2add6
1 changed files with 3 additions and 1 deletions
|
@ -7,7 +7,9 @@ fi
|
||||||
## source vars from .env first ##
|
## source vars from .env first ##
|
||||||
_root_directory_git=$(git rev-parse --show-toplevel)
|
_root_directory_git=$(git rev-parse --show-toplevel)
|
||||||
# shellcheck file=/dev/null
|
# shellcheck file=/dev/null
|
||||||
source "$_root_directory_git/.env"
|
if [[ -f "$_root_directory_git/.env" ]]; then
|
||||||
|
source "$_root_directory_git/.env"
|
||||||
|
fi
|
||||||
|
|
||||||
_branch_name_git=$(git rev-parse --abbrev-ref HEAD)
|
_branch_name_git=$(git rev-parse --abbrev-ref HEAD)
|
||||||
_commit_sha=$(git rev-parse HEAD)
|
_commit_sha=$(git rev-parse HEAD)
|
||||||
|
|
Loading…
Reference in a new issue