Skip to content

Commit cd49aae

Browse files
authored
feat(makefile): add update-lockfile target for poetry (#3218)
Added a Makefile target `update-lockfile` to update the Poetry lockfile using a script. Updated README to reflect the new workflow and renamed the script to `scripts/poetry_update_lock.sh` for clarity.
1 parent 444fbce commit cd49aae

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ reinstall-editable:
2222
test-env:
2323
@./scripts/setup_test_env.sh conway
2424

25+
# update poetry lockfile
26+
.PHONY: update-lockfile
27+
update-lockfile:
28+
@exit_code=0; \
29+
./scripts/poetry_update_lock.sh || exit_code=$$?; \
30+
if [ $$exit_code -ne 0 ] && [ $$exit_code -ne 10 ]; then \
31+
echo "Poetry lockfile update failed. Retrying without cache..." >&2; \
32+
./scripts/poetry_update_lock.sh --no-cache; \
33+
else \
34+
exit $$exit_code; \
35+
fi
36+
2537
# initialize linters
2638
.PHONY: init_lint
2739
init_lint:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ make lint
223223

224224
> ⚠️ After each dependencies update, repeat the steps above to retain dev mode.
225225
226-
### 📦 Update Poetry Dependencies
226+
### 📦 Update Poetry Lockfile
227227

228228
```sh
229-
./poetry_update_deps.sh
229+
make update-lockfile
230230
```
231231

232-
### 📚 Build Documentation
232+
### 📚 Build and Deploy Documentation
233233

234234
```sh
235235
make doc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ ! -d "cardano_node_tests" ]; then
1313
abort_install=1
1414
fi
1515
if [ "$abort_install" -eq 1 ]; then
16-
exit 1
16+
exit 10
1717
fi
1818

1919
# Filter out nix python packages from PYTHONPATH.

0 commit comments

Comments
 (0)