-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile: implement push-check with go fmt HMS-3099
- Loading branch information
1 parent
7937c87
commit 99e6f12
Showing
2 changed files
with
38 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/output | ||
/bin | ||
__pycache__ | ||
.python-version | ||
|
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 |
---|---|---|
@@ -1,4 +1,39 @@ | ||
# There's no heavy lifting here; this file is just a convenience | ||
# for people whose muscle memory for building projects starts with typing `make`. | ||
all: | ||
|
||
.PHONY: all | ||
all: build-binary build-container | ||
|
||
.PHONY: clean | ||
clean: | ||
# not sure if we should remove generated stuff | ||
# keep the output directory itself | ||
#-rm -rf output/* | ||
rm -rf bin | ||
@echo "removing test files that might be owned by root" | ||
sudo rm -rf /var/tmp/bib-tests | ||
|
||
.PHONY: test | ||
test: | ||
@echo "Be aware that the tests take a really long time" | ||
@echo "Running tests as root" | ||
sudo -E pip install --user -r test/requirements.txt | ||
sudo -E pytest -s -v | ||
|
||
.PHONY: build-binary | ||
build-binary: | ||
./build.sh | ||
|
||
.PHONY: build-container | ||
build-container: | ||
sudo podman build --tag bootc-image-builder . | ||
|
||
.PHONY: push-check | ||
push-check: build-binary build-container test | ||
cd bib; go fmt ./... | ||
@if [ 0 -ne $$(git status --porcelain --untracked-files|wc -l) ]; then \ | ||
echo "There should be no changed or untracked files"; \ | ||
git status --porcelain --untracked-files; \ | ||
exit 1; \ | ||
fi | ||
@echo "All looks good - congratulations" |