-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
54 lines (41 loc) · 1.18 KB
/
Copy pathjustfile
File metadata and controls
54 lines (41 loc) · 1.18 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
50
51
52
53
54
install:
. .venv/bin/activate; pip install -Ur requirements.txt
activate:
. .venv/bin/activate
install_venv:
python3 -m venv .venv
. .venv/bin/activate; python -m pip install --upgrade pip
. .venv/bin/activate; python -m pip install -r dev-requirements.txt
formatter:
. .venv/bin/activate; command black --line-length 125 .
check_format:
. .venv/bin/activate; command black --line-length 125 . --check
test:
. .venv/bin/activate; command cd src; command python -m pytest
start_detached:
docker compose up --build -d
start-test:
docker compose up --build
start:
docker compose up --build
stop:
docker compose stop
tag:
#!/bin/bash
# Get current date
CURRENT_DATE=$(date +%Y.%-m.%-d)
echo "Current date: $CURRENT_DATE"
# Get the latest tag that matches today's date pattern
LATEST_TAG=$(git tag --list "${CURRENT_DATE}.*" --sort=-version:refname | head -n1)
if [ -z "$LATEST_TAG" ]; then
# No tag for today, start with revision 1
REVISION=1
else
# Extract revision number and increment
REVISION=$(echo $LATEST_TAG | cut -d. -f4)
REVISION=$((REVISION + 1))
fi
NEW_TAG="${CURRENT_DATE}.${REVISION}"
echo "Creating new tag: $NEW_TAG"
git tag $NEW_TAG
git push --tag