← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/txpkgupload:remove-git-dependency-from-default-make-command into txpkgupload:master

 

Ines Almeida has proposed merging ~ines-almeida/txpkgupload:remove-git-dependency-from-default-make-command into txpkgupload:master.

Commit message:
Update Makefile default commands to not update version
    
This command requires a git directory, which doesn't always need to be the case when one runs the default `make` command, e.g., installing it from the tarball. This change moves that command to run when building the tarball, which should be the new way of deploying txpkgupload in the future


Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/txpkgupload/+git/txpkgupload/+merge/444912

Currently there is no good `make` command to run on charm install for txpkgupload.
The `make compile` command will fail and throw an error if not in a .git repository.

Another alternative would be to make it fail gracefully, but IMO it doesn't make much sense to me to need to run the `update-version` script there regardless.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/txpkgupload:remove-git-dependency-from-default-make-command into txpkgupload:master.
diff --git a/Makefile b/Makefile
index ddd2107..20c1a1e 100644
--- a/Makefile
+++ b/Makefile
@@ -39,9 +39,12 @@ SWIFT_OBJECT_PATH = \
 default: compile
 
 
-bootstrap compile:
+compile:
 	$(MAKE) $(ENV)
-	scripts/update-version-info.sh
+
+
+bootstrap: compile
+	$(MAKE) $(VERSION_INFO)
 
 
 $(VERSION_INFO):
@@ -106,6 +109,7 @@ build-tarball:
 	@echo "Creating deployment tarball at $(TARBALL_BUILD_PATH)"
 	rm -rf $(ENV)
 	$(MAKE) $(ENV)
+	$(MAKE) $(VERSION_INFO)
 	$(PIP) wheel -f $(DEPENDENCY_DIR) --no-index -w $(WHEELS) \
 		-r bootstrap-requirements.txt -r requirements.txt
 	mkdir -p $(TARBALL_BUILD_DIR)

Follow ups