2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Have make_dist infer the version

This commit is contained in:
Jay Berkenbilt 2018-02-21 07:02:45 -05:00
parent 82cae01a76
commit ca0d190812
2 changed files with 13 additions and 14 deletions

View File

@ -53,7 +53,7 @@ Example:
rm -rf /tmp/qpdf-x.y.z
git archive --prefix=qpdf-x.y.z/ HEAD . | (cd /tmp; tar xf -)
```
From the parent of that directory, run `make_dist` with the directory as an argument. Remember to have fop in your path. For internally testing releases, you can run make_dist with the `--no-tests` option.
From the parent of that directory, run `qpdf-x.y.z/make_dist`. Remember to have fop in your path. For internally testing releases, you can run make_dist with the `--no-tests` option.
* To create a source release of external libs, do an export from the version control system into a directory called `qpdf-external-libs` and just make a zip file of the result called `qpdf-external-libs-src.zip`. See the README.txt file there for information on creating binary external libs releases. Run this from the external-libs repository:
```
git archive --prefix=external-libs/ HEAD . | (cd /tmp; tar xf -)

View File

@ -9,16 +9,18 @@ use warnings;
use strict;
use File::Basename;
use Cwd;
use Cwd 'abs_path';
use IO::File;
my $whoami = basename($0);
my $srcdir = basename(dirname($0));
my $pwd = getcwd();
usage() unless $pwd eq abs_path(dirname(dirname($0)));
usage() unless @ARGV >= 1;
my $srcdir = shift(@ARGV);
my $run_tests = 1;
if (@ARGV)
foreach my $arg (@ARGV)
{
if ($ARGV[0] eq '--no-tests')
if ($arg eq '--no-tests')
{
$run_tests = 0;
}
@ -27,12 +29,9 @@ if (@ARGV)
usage();
}
}
$srcdir =~ s,/$,,;
usage() unless $srcdir =~ m/^qpdf-(\d+\.\d+(?:\.(a|b|rc)?\d+)?)$/;
my $version = $1;
usage() unless -d $srcdir;
my $pwd = getcwd();
cd($srcdir);
# Check versions
@ -139,12 +138,12 @@ sub cd
sub usage
{
die "
Usage: $whoami qpdf-version [ --no-tests ]
Usage: $whoami [ --no-tests ]
qpdf-version must be a directory containing a pristine export of that
version of qpdf from the version control system. Use of --no-tests
can be used for internally testing releases, but do not use it for a
real release.
$whoami must be run from the parent of a directory called
qpdf-<version> which must contain a pristine export of that version of
qpdf from the version control system. Use of --no-tests can be used
for internally testing releases, but do not use it for a real release.
";
}