-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile to make testing and publishing easier
- Loading branch information
1 parent
2a35f17
commit ea29da5
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
publish: publish_dry | ||
@echo "---------------" | ||
@echo "Running publish" | ||
@echo "---------------" | ||
cargo publish | ||
|
||
publish_dry: test_docker | ||
@echo "-------------------" | ||
@echo "Running publish_dry" | ||
@echo "-------------------" | ||
@if [ -n "$(git status --porcelain)" ]; then \ | ||
echo "There are changes." && exit 1; \ | ||
fi | ||
cargo publish --dry-run | ||
|
||
test_docker: setup_tests | ||
@echo "-------------------" | ||
@echo "Running test_docker" | ||
@echo "-------------------" | ||
docker build -t tinty . && docker run tinty | ||
|
||
test: setup_tests | ||
@echo "------------" | ||
@echo "Running test" | ||
@echo "------------" | ||
RUST_TEST_THREADS=1 cargo test | ||
|
||
setup_tests: build | ||
@echo "-----------------" | ||
@echo "Creating fixtures" | ||
@echo "-----------------" | ||
./scripts/create_fixtures | ||
|
||
build: | ||
@echo "-------------" | ||
@echo "Running build" | ||
@echo "-------------" | ||
cargo build --release | ||
|