-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.sh
executable file
·39 lines (27 loc) · 1.05 KB
/
setup.sh
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
#!/bin/sh
#if something goes wrong, stop the script
set -e
# exports all variables in .env file. Any variable defined in the script will be available in the environment.
set -a
# Install virtualenv if not installed
pip install virtualenv
# Create a new virtual environment
virtualenv env
# It gives permission to activate the virtual environment
chmod +x ./env/bin/activate
# Activate the virtual environment
source env/bin/activate # On Windows, use `env\Scripts\activate`
# # Load the environment variables
source .env
# You can pip install dbt if need; Currently running on dbt-core==1.3.0
# pip install dbt-core==1.3.0
# Install requirements
pip install -r ./requirements.txt
# It installs pre-commit hooks into your Git repository.
pre-commit install -c .pre-commit-config.yaml
# Dbt deps command is used to download and manage the dependencies of a dbt project.
dbt deps
# It gives permission to execute the cleanup script
chmod +x ./pre-commit/cleanup.sh
# It gives permission to execute the for_pre_commit script
chmod +x ./pre-commit/for_pre_commit.sh