Skip to content

Commit

Permalink
Packages: Move dist target to git archive
Browse files Browse the repository at this point in the history
  • Loading branch information
thresheek committed Feb 16, 2024
1 parent c3af21e commit baff936
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
*.c diff=cpp
*.h diff=cpp

.hg* export-ignore
pkg/** export-ignore
docs/*.* export-ignore
docs/Makefile export-ignore
9 changes: 5 additions & 4 deletions pkg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ default:

dist:
rm -f unit-$(VERSION).tar.gz
hg archive unit-$(VERSION).tar.gz \
-r $(VERSION) \
-p unit-$(VERSION) \
-X "../.hg*" -X "../pkg/" -X "../docs/*.*" -X "../docs/Makefile"
cd .. && git archive \
--output pkg/unit-$(VERSION).tar.gz \
--prefix unit-$(VERSION)/ \
--worktree-attributes \
$(VERSION) ./
$(SHA512SUM) unit-$(VERSION).tar.gz > unit-$(VERSION).tar.gz.sha512

rpm:
Expand Down

0 comments on commit baff936

Please sign in to comment.