Merge ~ines-almeida/txpkgupload:update-build-tarball-command into txpkgupload:master

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: c2af8673705b46427ce10fbdaf13f83f56bb73fa
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/txpkgupload:update-build-tarball-command
Merge into: txpkgupload:master
Diff against target: 28 lines (+9/-8)
1 file modified
Makefile (+9/-8)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+446168@code.launchpad.net

Commit message

Refactor build-tarball in Makefile

Instead of excluding files/directories to build the tarball, we select the wanted ones

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

There is a typo in the git commit message shown below

> Reactor build-tarball in makefile

's/Reactor/Refactor'. I'd also recommend specifying the file as 'Makefile'.

LGTM otherwise. 👍

review: Approve
Revision history for this message
Ines Almeida (ines-almeida) wrote :

I updated the commit message in the MP, but not in the branch. Updated it now!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 313b16e..b356b8f 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -109,14 +109,15 @@ build-tarball:
6 $(PIP) wheel -f $(DEPENDENCY_DIR) --no-index -w $(WHEELS) \
7 -r bootstrap-requirements.txt -r requirements.txt
8 mkdir -p $(TARBALL_BUILD_DIR)
9- tar -czf $(TARBALL_BUILD_PATH) \
10- --exclude-vcs \
11- --exclude __pycache__ \
12- --exclude build \
13- --exclude dist \
14- --exclude charm \
15- --exclude env \
16- ./
17+ (
18+ git ls-files | sed 's,^,./,'
19+ echo ./version-info.py
20+ find $(WHEELS) -name \*.whl -print
21+ ) | sort >"$(TARBALL_BUILD_DIR)/.files"
22+
23+ # Create the tarball.
24+ tar -czf $(TARBALL_BUILD_PATH) --no-recursion \
25+ --files-from "$(TARBALL_BUILD_DIR)/.files"
26
27
28 .PHONY: publish-tarball

Subscribers

People subscribed via source and target branches

to all changes: