Re: make dist using git archive
Tristan Partin <tristan@neon.tech>
From: "Tristan Partin" <tristan@neon.tech>
To: "Peter Eisentraut" <peter@eisentraut.org>
Cc: "pgsql-hackers" <pgsql-hackers@postgresql.org>
Date: 2024-03-24T15:42:53Z
Lists: pgsql-hackers
3 comments left that are inconsequential. Feel free to ignore.
> +# Meson has its own distribution building command (meson dist), but we
> +# are not using that at this point. The main problem is that the way
> +# they have implemented it, it is not deterministic. Also, we want it
> +# to be equivalent to the "make" version for the time being. But the
> +# target name "dist" in meson is reserved for that reason, so we call
> +# the custom target "pgdist".
The second sentence is a run-on.
> +if bzip2.found()
> + tar_bz2 = custom_target('tar.bz2',
> + build_always_stale: true,
> + command: [git, '-C', '@SOURCE_ROOT@',
> + '-c', 'core.autocrlf=false',
> + '-c', 'tar.tar.bz2.command="' + bzip2.path() + '" -c',
> + 'archive',
> + '--format', 'tar.bz2',
> + '--prefix', distdir + '/',
> + '-o', join_paths(meson.build_root(), '@OUTPUT@'),
> + 'HEAD', '.'],
> + install: false,
> + output: distdir + '.tar.bz2',
> + )
You might find Meson's string formatting syntax creates a more readable
command string:
'tar.tar.bz2.command=@0@ -c'.format(bzip2.path())
And then 'install: false' is the default if you feel like leaving it
out.
Otherwise, let's get this in!
--
Tristan Partin
Neon (https://neon.tech)
Commits
-
make dist uses git archive
- 619bc23a1a2f 17.0 landed
-
ci: freebsd repartition script didn't copy .git directory
- fc2d260c7e62 17.0 landed