aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-17 02:08:02 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2020-06-17 02:08:02 +0100
commit2c0f345a6df913c1a532c407fe4b8fa4445dafdb (patch)
tree9c2909a5bb09a06f7a6babc6180a902b426e6672
parentbd45b666acaef5fc7523e4bc2ca9fb8aa74cbefd (diff)
New target --dist-software to package all necessary software tarballs
When publishing a project, it is necessary to also publish the source code of all necessary software of the project. We had recently added a new './project make' target called 'dist-software' for this job, but had forgotten to add it in the output of './project --help'! There was also a small bug inside of it that didn't allow the successful copying of the created tarball to the top project directory. With this commit, an explanation for this target has been added in the output of './project --help' and that bug has been fixed.
-rwxr-xr-xproject3
-rw-r--r--reproduce/analysis/make/initialize.mk8
2 files changed, 5 insertions, 6 deletions
diff --git a/project b/project
index d14e3b0..cc2140f 100755
--- a/project
+++ b/project
@@ -92,6 +92,9 @@ Project 'make' special features.
uploaded to servers like 'arXiv.org'.
./project make dist-lzip Similar to 'dist', but compress to '.tar.lz'.
./project make dist-zip Similar to 'dist', but compress to '.zip'.
+ ./project make dist-software Build a .tar.gz tarball containing all
+ software source tarballs necessary for the
+ project.
With the options below you can modify the default behavior.
Configure options:
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index acc527d..b2185e2 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -380,19 +380,15 @@ dist-zip: $(project-package-contents)
# Package the software tarballs.
dist-software:
curdir=$$(pwd)
+ dirname=software-$(project-commit-hash)
cd $(BDIR)
- if [ -d .git ]; then
- dirname="software-$$(git describe --dirty --always --long)"
- else
- dirname="software-NOGIT";
- fi
mkdir $$dirname
cp -L software/tarballs/* $$dirname/
tar -cf $$dirname.tar $$dirname
gzip -f --best $$dirname.tar
rm -rf $$dirname
cd $$curdir
- mv $(BDIR)/$$dir.tar.gz ./
+ mv $(BDIR)/$$dirname.tar.gz ./