Makefile: implement push-check
Tries to replicate github actions as close as possible
This commit is contained in:
parent
8e98884bff
commit
e31ec13c87
4 changed files with 32 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -9,3 +9,5 @@ __pycache__
|
|||
/rpmbuild
|
||||
|
||||
/tools/appsre-ansible/inventory
|
||||
|
||||
/docs/osbuild-composer.7
|
||||
|
|
|
|||
19
Makefile
19
Makefile
|
|
@ -74,9 +74,14 @@ help:
|
|||
@echo
|
||||
@echo " help: Print this usage information."
|
||||
@echo " build: Build all binaries"
|
||||
@echo " rpm: Build the RPM"
|
||||
@echo " srpm: Build the source RPM"
|
||||
@echo " scratch: Quick scratch build of RPM"
|
||||
@echo " clean: Remove all built binaries"
|
||||
@echo " man: Generate all man-pages"
|
||||
@echo " unit-tests: Run unit tests"
|
||||
@echo " push-check: Replicates the github workflow checks as close as possible"
|
||||
@echo " (do this before pushing!)"
|
||||
|
||||
$(BUILDDIR)/:
|
||||
mkdir -p "$@"
|
||||
|
|
@ -148,6 +153,20 @@ install: build
|
|||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/bin/
|
||||
rm -rf $(CURDIR)/rpmbuild
|
||||
|
||||
.PHONY: push-check
|
||||
push-check: build unit-tests srpm man
|
||||
./tools/check-runners
|
||||
./tools/check-snapshots --errors-only .
|
||||
rpmlint --config rpmlint.config $(CURDIR)/rpmbuild/SRPMS/*
|
||||
./tools/prepare-source.sh
|
||||
@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"
|
||||
|
||||
CERT_DIR=/etc/osbuild-composer
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ At build-time, the following software is required:
|
|||
* `btrfs-progs-devel` for fedora/rhel or `libbtrfs-dev` for debian/ubuntu
|
||||
* `device-mapper-devel` for fedora/rhel or `libdevmapper-dev` for debian/ubuntu
|
||||
* `gpgme-devel` for fedora/rhel or `libgpgme-dev` for debian/ubuntu
|
||||
* `rpmdevtools` (only for `make push-check`)
|
||||
* `rpmlint` (only for `make push-check`)
|
||||
|
||||
### Build
|
||||
|
||||
|
|
@ -88,6 +90,12 @@ To run our tests locally just call
|
|||
make unit-tests
|
||||
```
|
||||
|
||||
Before pushing something for a pull request you should run this check to avoid problems with required github actions
|
||||
|
||||
```sh
|
||||
make push-check
|
||||
```
|
||||
|
||||
### Repository:
|
||||
|
||||
- **web**: <https://github.com/osbuild/osbuild-composer>
|
||||
|
|
|
|||
3
rpmlint.config
Normal file
3
rpmlint.config
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# composer-cli is no spelling error
|
||||
Filters = ["spelling-error.*'cli'.*"]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue