-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
61 lines (48 loc) · 2 KB
/
Copy pathJustfile
File metadata and controls
61 lines (48 loc) · 2 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
55
56
57
58
59
60
61
poetry := "poetry"
poetry_run := poetry + " run"
run *args:
{{ poetry_run }} python -m mkcli {{ args }}
default:
just --list --unsorted
setup:
{{ poetry }} check
{{ poetry }} install
lint:
{{ poetry_run }} ruff format
{{ poetry_run }} ruff check --fix
{{ poetry_run }} run mypy .
test *args:
{{ poetry_run }} pytest -sv tests/unit/
build:
rm -rf dist
{{ poetry_run }} build
hook:
{{ poetry_run }} pre-commit install --install-hooks --overwrite
unhook:
{{ poetry_run }} pre-commit uninstall
docs:
MKCLI_BETA_FEATURE_FLAG=false poetry run python -m typer mkcli/main.py utils docs --title "mkcli reference documentation" --output docs/reference/cli.md
cat docs/intro.md > README.md # add intro
echo '' >> README.md # add a newline
cat docs/guides/installation.md >> README.md # add installation
echo '' >> README.md # add a newline
cat docs/guides/usage.md >> README.md
echo '' >> README.md # add a newline
cat docs/reference/cli.md >> README.md # add CLI reference
echo '' >> README.md # add a newline
docs-run-server:
{{ poetry_run }} mkdocs build
{{ poetry_run }} mkdocs serve
bump-version *args:
{{ poetry }} version {{ args }}
echo "__version__ = \"$(cat pyproject.toml | grep version | cut -d ' ' -f 3 | tr -d '\"')\"" > mkcli/_version.py
git add pyproject.toml mkcli/_version.py && git commit -m "Bump version to {{ args }}"
load-env-local:
export VAULT_ADDR="https://vault.intra.cloudferro.com"
export VAULT_SKIP_VERIFY=true
vault login -method=oidc -path=azure
export API_TOKEN_PROD="$(vault kv get -tls-skip-verify -field=API_TOKEN_PROD secrets/mk8s/test)"
test-integration-build:
docker build -f Dockerfile-test -t mkcli-integration-tests .
test-integration-run ENV: # example: just test/integration/run staging
docker run --rm -e API_TOKEN_STAGING=$API_TOKEN_STAGING -e API_TOKEN_PROD=$API_TOKEN_PROD -e MKCLI__DEBUG=False mkcli-integration-tests tests/integration -v -s --env {{ ENV }}