Skip to content

Commit

Permalink
add bash script to write ENV value to stdout depending on Git branch …
Browse files Browse the repository at this point in the history
…activated
  • Loading branch information
m-p-esser committed Oct 16, 2023
1 parent 7c6472d commit 45d5559
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/scripts/env_init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
current_branch=$(git symbolic-ref --short HEAD)

case $current_branch in \
"develop") \
echo "dev"; \
;; \
"test") \
echo "test"; \
;; \
"master") \
echo "prod"; \
;; \
*) \
echo "dev"; \
;; \
esac;

0 comments on commit 45d5559

Please sign in to comment.