Skip to content

Commit

Permalink
chore: remove unused targets from the makefile (#1496)
Browse files Browse the repository at this point in the history
We now bump the version by editing the workspace `Cargo.toml`. The
README will be fixed in a separate patch.
  • Loading branch information
Stebalien authored Jan 11, 2024
1 parent ee2e621 commit 2654cf2
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
SHELL=/usr/bin/env bash

# How much to "bump" the version by on release.
BUMP ?= patch
VERSION ?= $(error VERSION environment variable must be set)

# Run cargo fmt
rustfmt:
cargo fmt --all --check
Expand All @@ -20,21 +16,6 @@ check:
test:
cargo test --workspace

# Release a new version. Specify the version "bump" with BUMP
bump-version: check-clean deps-release check
cargo set-version --workspace --bump $(BUMP)
cargo update --workspace
@echo "Bumped actors to version $$($(MAKE) --quiet version)"

set-version: check-clean deps-release check
cargo set-version --workspace $(VERSION)
cargo update --workspace
@echo "Set actors to version $(VERSION)"

# Publish the current version to crates.io
publish:
cargo workspaces publish --from-git

# Create a bundle in a deterministic location
bundle:
cargo run -- -o output/builtin-actors.car
Expand All @@ -61,24 +42,12 @@ bundle-testing:
BUILD_FIL_NETWORK=testing cargo run -- -o output/builtin-actors-testing.car
BUILD_FIL_NETWORK=testing-fake-proofs cargo run -- -o output/builtin-actors-testing-fake-proofs.car

.PHONY: all-bundles bundle-mainnet bundle-caterpillarnet bundle-butterflynet bundle-calibrationnet bundle-devnet bundle-testing

# Check if the working tree is clean.
check-clean:
@git diff --quiet || { \
echo "Working tree dirty, please commit any changes first."; \
exit 1; \
}

# Check if we have the required deps.
deps-release:
@which cargo-set-version >/dev/null 2>&1 || { \
echo "Please install cargo-edit: 'cargo install cargo-edit'."; \
exit 1; \
}
@which cargo-workspaces >/dev/null 2>&1 || { \
echo "Please install cargo-workspaces: 'cargo install cargo-workspaces'."; \
exit 1; \
}

.PHONY: check check-clean deps deps-release deps-release test publish bump-version set-version bundle
.PHONY: rustfmt check check-clean test bundle
.PHONY: all-bundles bundle-mainnet bundle-caterpillarnet bundle-butterflynet bundle-calibrationnet bundle-devnet bundle-testing

0 comments on commit 2654cf2

Please sign in to comment.