-
Notifications
You must be signed in to change notification settings - Fork 17
/
Justfile
53 lines (38 loc) · 1.13 KB
/
Justfile
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
# Setup
install:
uv sync
# Packaging
build:
rm -rf dist
uv build
publish:
uv publish --token $(<credentials/pypi_token)
rm -rf dist
# Testing
test:
export TEST_TOKEN=$(cat ~/.latch/token) &&\
pytest -s tests
# Docs
build-api-docs:
rm docs/source/api/*
sphinx-apidoc \
--force \
-o docs/source/api/ . \
'latch_cli/services/init/*/**' \
'latch_cli/snakemake' \
'tests/*'
build-docs:
make --directory docs html
git_hash := `git rev-parse --short=4 HEAD`
git_branch := `inp=$(git rev-parse --abbrev-ref HEAD); echo "${inp//\//--}"`
docker_image_name := "sdk-docs"
docker_registry := "812206152185.dkr.ecr.us-west-2.amazonaws.com"
docker_image_version := docker_image_name + "-" + git_hash + "-" + git_branch
docker_image_full := docker_registry + "/" + docker_image_name + ":" + docker_image_version
@docker-login:
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin {{docker_registry}}
@docker-build: build
docker build -t {{docker_image_full}} . -f Dockerfile.docs
@docker-push:
docker push {{docker_image_full}}
@dbnp: build-docs docker-build docker-push