-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
29 lines (27 loc) · 1.1 KB
/
Makefile
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
#############################
# █▀█ █▀▀ █░░ █▀▀ ▄▀█ █▀ █▀▀
# █▀▄ ██▄ █▄▄ ██▄ █▀█ ▄█ ██▄
#############################
# requirements
# - cargo-edit crate: `cargo install cargo-edit` >= 0.12.2
# - jq linux terminal tool : `sudo apt-get install jq`
# How to make a update?
# - Update the version-manager.json file
# - make update
# - make publish
# Publishing
publish:
git checkout -b v$(shell jq .hdk ./version-manager.json) | 2> /dev/null
git commit -a -m "version bump $(shell jq .hdk ./version-manager.json)"
cargo publish
git tag $(shell jq .hdk ./version-manager.json) | 2>/dev/null
git push origin v$(shell jq .hdk ./version-manager.json)
git push origin refs/tags/$(shell jq .hdk ./version-manager.json)
update:
echo '⚙️ Updating hdk crate...'
cargo upgrade -p hdk@=$(shell jq .hdk ./version-manager.json) --pinned
echo '⚙️ Build...'
cargo update; cargo build
echo '⚙️ Version bump of hc_utils crate...'
cargo set-version $(shell jq .hdk ./version-manager.json) --workspace
cargo update