Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify packit custom create archive command #249

Merged
merged 1 commit into from
Aug 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ synced_files:
upstream_project_name: tmt
downstream_package_name: tmt

current_version_command: ["make", "packit-version"]

actions:
create-archive:
- make packit-tarball
- make packit-path
- make tarball
get-current-version:
- make version

jobs:
- job: tests
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,24 @@ man: source
rst2man $(TMP)/man.rst > $(TMP)/$(PACKAGE)/tmt.1


# RPM packaging
# RPM packaging and Packit
source: clean tmp
mkdir -p $(TMP)/SOURCES
mkdir -p $(TMP)/$(PACKAGE)
cp -a $(FILES) $(TMP)/$(PACKAGE)
rm $(TMP)/$(PACKAGE)/tmt/steps/provision/{base,vagrant}.py
tarball: source man
cd $(TMP) && tar cfz SOURCES/$(PACKAGE).tar.gz $(PACKAGE)
@echo ./tmp/SOURCES/$(PACKAGE).tar.gz
version:
@echo "$(VERSION)"
rpm: tarball
rpmbuild --define '_topdir $(TMP)' -bb tmt.spec
srpm: tarball
rpmbuild --define '_topdir $(TMP)' -bs tmt.spec
packages: rpm srpm


# Packit stuff
packit-tarball: tarball
mv $(TMP)/SOURCES/$(PACKAGE).tar.gz .
packit-path:
@printf "$(PACKAGE).tar.gz"
packit-version:
@printf "$(VERSION)"


# Python packaging
wheel:
python setup.py bdist_wheel
Expand Down