-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·49 lines (45 loc) · 1.21 KB
/
bootstrap
File metadata and controls
executable file
·49 lines (45 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
export PATH="$HOME/.local/bin:$HOME/.asdf/bin:$HOME/.asdf/shims:$PATH"
# macos default path
# export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" || source /etc/profile
# ubuntu default path
# export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
# case statement to choose input arguments
case "$1" in
install)
# Build the environment
sh -c "make install"
;;
run)
# Run the playbook
ansible-playbook \
-i ./ansible/hosts \
./ansible/playbook.yml
;;
run-dev)
# Run the playbook with tags and debug
ansible-playbook \
-i ./ansible/hosts \
./ansible/playbook.yml \
--tags test,qa -vvv
;;
install-precommit)
# Install pre-commit hooks
pre-commit install
;;
update-precommit)
# Update pre-commit hooks
pre-commit autoupdate
;;
release)
# Build and publish the app
sh -c "make release"
;;
test)
# Run tests
sh -c "make test"
;;
*)
echo $"Usage: $0 <install|run|run-dev|install-precommit|update-precommit|release|test>"
exit 1
esac