Skip to content

Commit d8ee7fb

Browse files
committed
build: change devbase-justkit name, improve dev doc
Signed-off-by: Josef Andersson <josef.andersson@digg.se>
1 parent 11c60b3 commit d8ee7fb

File tree

2 files changed

+86
-6
lines changed

2 files changed

+86
-6
lines changed

docs/DEVELOPMENT.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,83 @@ This guide outlines core essentials for developing in this project.
1818

1919
## Setup and Configuration
2020

21+
### Prerequisites - Linux
22+
23+
1. Install [mise](https://mise.jdx.dev/) (manages linting tools):
24+
25+
```bash
26+
curl https://mise.run | sh
27+
```
28+
29+
2. Activate mise in your shell:
30+
31+
```bash
32+
# For bash - add to ~/.bashrc
33+
eval "$(mise activate bash)"
34+
35+
# For zsh - add to ~/.zshrc
36+
eval "$(mise activate zsh)"
37+
38+
# For fish - add to ~/.config/fish/config.fish
39+
mise activate fish | source
40+
```
41+
42+
Then restart your terminal.
43+
44+
3. Install pipx (needed for reuse license linting):
45+
46+
```bash
47+
# Debian/Ubuntu
48+
sudo apt install pipx
49+
```
50+
51+
4. Install project tools:
52+
53+
```bash
54+
mise install
55+
```
56+
57+
### Prerequisites - macOS
58+
59+
1. Install [mise](https://mise.jdx.dev/) (manages linting tools):
60+
61+
```bash
62+
brew install mise
63+
```
64+
65+
2. Activate mise in your shell:
66+
67+
```bash
68+
# For zsh - add to ~/.zshrc
69+
eval "$(mise activate zsh)"
70+
71+
# For bash - add to ~/.bashrc
72+
eval "$(mise activate bash)"
73+
74+
# For fish - add to ~/.config/fish/config.fish
75+
mise activate fish | source
76+
```
77+
78+
Then restart your terminal.
79+
80+
3. Install newer bash than macOS default:
81+
82+
```bash
83+
brew install bash
84+
```
85+
86+
4. Install pipx (needed for reuse license linting):
87+
88+
```bash
89+
brew install pipx
90+
```
91+
92+
5. Install project tools:
93+
94+
```bash
95+
mise install
96+
```
97+
2198
### IDE Setup
2299

23100
#### VSCode

justfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# Quality checks and automation for Hash2Curve Library
66
# Run 'just' to see available commands
77

8-
devtools_repo := env("DEVBASE_JUSTKIT_REPO", "https://github.com/diggsweden/devbase-justkit")
9-
devtools_dir := env("XDG_DATA_HOME", env("HOME") + "/.local/share") + "/devbase-justkit"
8+
devtools_repo := env("DEVBASE_CHECK_REPO", "https://github.com/diggsweden/devbase-check")
9+
devtools_dir := env("XDG_DATA_HOME", env("HOME") + "/.local/share") + "/devbase-check"
1010
lint := devtools_dir + "/linters"
1111
java_lint := devtools_dir + "/linters/java"
1212
colors := devtools_dir + "/utils/colors.sh"
@@ -43,18 +43,21 @@ setup-devtools:
4343
#!/usr/bin/env bash
4444
set -euo pipefail
4545
if [[ -d "{{devtools_dir}}" ]]; then
46-
"{{devtools_dir}}/scripts/setup.sh" "{{devtools_repo}}" "{{devtools_dir}}"
46+
# setup.sh handles update checks with 1-hour cache
47+
if [[ -f "{{devtools_dir}}/scripts/setup.sh" ]]; then
48+
"{{devtools_dir}}/scripts/setup.sh" "{{devtools_repo}}" "{{devtools_dir}}"
49+
fi
4750
else
48-
printf "Cloning devbase-justkit to %s...\n" "{{devtools_dir}}"
51+
printf "Cloning devbase-check to %s...\n" "{{devtools_dir}}"
4952
mkdir -p "$(dirname "{{devtools_dir}}")"
5053
git clone --depth 1 "{{devtools_repo}}" "{{devtools_dir}}"
51-
git -C "{{devtools_dir}}" fetch --tags --quiet
54+
git -C "{{devtools_dir}}" fetch --tags --depth 1 --quiet
5255
latest=$(git -C "{{devtools_dir}}" describe --tags --abbrev=0 origin/main 2>/dev/null || echo "")
5356
if [[ -n "$latest" ]]; then
5457
git -C "{{devtools_dir}}" fetch --depth 1 origin tag "$latest" --quiet
5558
git -C "{{devtools_dir}}" checkout "$latest" --quiet
5659
fi
57-
printf "Installed devbase-justkit %s\n" "${latest:-main}"
60+
printf "Installed devbase-check %s\n" "${latest:-main}"
5861
fi
5962

6063
# Check required tools are installed

0 commit comments

Comments
 (0)