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:
parent
82cae01a76
commit
ca0d190812
@ -53,7 +53,7 @@ Example:
|
|||||||
rm -rf /tmp/qpdf-x.y.z
|
rm -rf /tmp/qpdf-x.y.z
|
||||||
git archive --prefix=qpdf-x.y.z/ HEAD . | (cd /tmp; tar xf -)
|
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:
|
* 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 -)
|
git archive --prefix=external-libs/ HEAD . | (cd /tmp; tar xf -)
|
||||||
|
25
make_dist
25
make_dist
@ -9,16 +9,18 @@ use warnings;
|
|||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
use Cwd 'abs_path';
|
||||||
use IO::File;
|
use IO::File;
|
||||||
|
|
||||||
my $whoami = basename($0);
|
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;
|
my $run_tests = 1;
|
||||||
if (@ARGV)
|
foreach my $arg (@ARGV)
|
||||||
{
|
{
|
||||||
if ($ARGV[0] eq '--no-tests')
|
if ($arg eq '--no-tests')
|
||||||
{
|
{
|
||||||
$run_tests = 0;
|
$run_tests = 0;
|
||||||
}
|
}
|
||||||
@ -27,12 +29,9 @@ if (@ARGV)
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$srcdir =~ s,/$,,;
|
|
||||||
usage() unless $srcdir =~ m/^qpdf-(\d+\.\d+(?:\.(a|b|rc)?\d+)?)$/;
|
usage() unless $srcdir =~ m/^qpdf-(\d+\.\d+(?:\.(a|b|rc)?\d+)?)$/;
|
||||||
my $version = $1;
|
my $version = $1;
|
||||||
usage() unless -d $srcdir;
|
|
||||||
|
|
||||||
my $pwd = getcwd();
|
|
||||||
cd($srcdir);
|
cd($srcdir);
|
||||||
|
|
||||||
# Check versions
|
# Check versions
|
||||||
@ -139,12 +138,12 @@ sub cd
|
|||||||
sub usage
|
sub usage
|
||||||
{
|
{
|
||||||
die "
|
die "
|
||||||
Usage: $whoami qpdf-version [ --no-tests ]
|
Usage: $whoami [ --no-tests ]
|
||||||
|
|
||||||
qpdf-version must be a directory containing a pristine export of that
|
$whoami must be run from the parent of a directory called
|
||||||
version of qpdf from the version control system. Use of --no-tests
|
qpdf-<version> which must contain a pristine export of that version of
|
||||||
can be used for internally testing releases, but do not use it for a
|
qpdf from the version control system. Use of --no-tests can be used
|
||||||
real release.
|
for internally testing releases, but do not use it for a real release.
|
||||||
|
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user