[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 428b7620 2/3: developer-build: new option to s
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 428b7620 2/3: developer-build: new option to specify compression |
Date: |
Fri, 22 Sep 2023 13:41:28 -0400 (EDT) |
branch: master
commit 428b76204b91ca8251d2254c2416d5b55efbae9e
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
developer-build: new option to specify compression
Until now, the developer build script would only produce a 'tar.lz'
compressed tarball. However, in some cases, it is necessary to produce a
different compression.
With this commit, a new '--compression' option has bene added to the
'./developer-build' script, allowing users to select either '.lz' or '.xz'
compressed tarballs. If any future format is necessary, it is easy to add.
---
developer-build | 25 +++++++++++++++++++++----
doc/release-checklist.txt | 13 +++++++++++--
2 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/developer-build b/developer-build
index 2c0b0d27..b1889a5a 100755
--- a/developer-build
+++ b/developer-build
@@ -47,6 +47,7 @@ reconf=0
upload=0
install=0
valgrind=0
+compression=lz
prefix=/usr/local
@@ -196,9 +197,12 @@ Options:
-i, --install Run 'sudo make install' after the build.
Current status: $install_status
- -D, --dist Build a tar.lz tarball and PDF manual.
+ -D, --dist Build a compressed tarball and PDF manual.
Current status: $dist_status
+ -z, --compression=STR Compression algorithm to use: 'lz' or 'xz'.
+ Current value: $compression
+
-u, --upload STR First run '--dist', then upload tarball and PDF
manual to the given 'server:folder'.
For example: -u my-server:folder
@@ -302,6 +306,11 @@ do
dist=1
shift # past argument
;;
+ -z|--compression)
+ compression="$2"
+ shift # past argument
+ shift # past value
+ ;;
-u|--upload)
dist=1
upload=1
@@ -371,6 +380,14 @@ if ! [ -f configure ]; then
exit 1
fi
+# Make sure a reasonable value is given to '--compression':
+if [ x"$compression" = xlzip ]; then compsuff=lz;
+elif [ x"$compression" = xxz ]; then compsuff=xz;
+else
+ echo "$compression: value of '--compression' ('-z') not recognized. It
should be either 'lzip' or 'xz'"; exit 1
+fi
+
+
@@ -529,7 +546,7 @@ fi
# Make the tarball and PDF for distribution. Then put a copy of the PDF in
# the top build directory for easy usage later.
if [ x$dist = x1 ]; then
- make dist-lzip pdf
+ make dist-$compression pdf
cp doc/gnuastro.pdf ./
fi
@@ -543,12 +560,12 @@ if [ x$upload = x1 ]; then
# name. Note that with the '--upload' option, '--dist' is also
# activated, so the tarball is already built and ready by this
# step.
- tarball=$(ls *.tar.lz)
+ tarball=$(ls *.tar.$compsuff)
base=$(echo $tarball | sed -e's/-/ /' | awk '{print $1}')
# File names:
pdf=$base.pdf
- latest=$base"-latest.tar.lz"
+ latest=$base"-latest.tar.$compsuff"
# Copy the files to the subdirectories of the given URL (must include
# folders).
diff --git a/doc/release-checklist.txt b/doc/release-checklist.txt
index 49ab94f5..522753f0 100644
--- a/doc/release-checklist.txt
+++ b/doc/release-checklist.txt
@@ -59,10 +59,19 @@ all the commits needed for this release have been completed.
$ git checkout master
$ git log --oneline --graph --decorate --all # For a visual check.
- - Activate the Conda-forge build:
+ - Activate the Conda-forge build to see if the distribution builds on all
+ the architectures there.
+
+ - Build and upload the Gnuastro tarball with tar.xz since Conda does not
+ recognize 'tar.lz'! Then upload it to a URL that Conda can download
+ from:
+
+ $ ./developer-build -p junk; cd build && make dist-xz
+ $ scp gnuastro-X.X.X-XXXX.tar.xz server:location/
- Clone the Conda-forge repository for building Gnuastro (change 'XXXX'
- to the version string):
+ to the version string); if you already have it, just pull the recent
+ changes.
$ git@github.com:conda-forge/gnuastro-feedstock.git
$ cd gnuastro-feedstock