Update Creating-releases.md [skip ci]

pull/7183/head
Michael Brockus 5 years ago committed by GitHub
parent 52a36a5521
commit 3f1108c923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 55
      docs/markdown/Creating-releases.md

@ -5,9 +5,10 @@ short-description: Creating releases
# Creating releases # Creating releases
In addition to development, almost all projects provide periodical In addition to development, almost all projects provide periodical
source releases. These are standalone packages (usually either in tar source releases. These are standalone packages (usually either in
or zip format) of the source code. They do not contain any revision tar or zip format) of the source code. They do not contain any
control metadata, only the source code. revision control metadata, only the source code. Meson provides
a simple way of generating these, with the `meson dist` command.
Meson provides a simple way of generating these. It consists of a Meson provides a simple way of generating these. It consists of a
single command *(available since 0.52.0)*: single command *(available since 0.52.0)*:
@ -23,17 +24,37 @@ ninja dist
``` ```
This creates a file called `projectname-version.tar.xz` in the build This creates a file called `projectname-version.tar.xz` in the build
tree subdirectory `meson-dist`. This archive contains the full tree subdirectory `meson-dist`. This archive contains the full contents
contents of the latest commit in revision control including all the of the latest commit in revision control including all the submodules
submodules (recursively). All revision control metadata is removed. (recursively). All revision control metadata is removed. Meson then
Meson then takes takes this archive and tests that it works by doing a full
this archive and tests that it works by doing a full compile + test + `compile` + `test` + `install` cycle. If all these pass, Meson will
install cycle. If all these pass, Meson will then create a SHA-256 then create a `SHA-256` checksum file next to the archive.
checksum file next to the archive.
**Note**: Meson behaviour is different from Autotools. The Autotools ## Autotools dist VS Meson dist
"dist" target packages up the current source tree. Meson packages
the latest revision control commit. The reason for this is that it Meson behaviour is different from Autotools. The Autotools "dist"
prevents developers from doing accidental releases where the target packages up the current source tree. Meson packages the latest
distributed archive does not match any commit in revision control revision control commit. The reason for this is that it prevents developers
(especially the one tagged for the release). from doing accidental releases where the distributed archive does not match
any commit in revision control (especially the one tagged for the release).
## Include subprojects in your release
The `meson dist` command has `--include-subprojects` command line option.
When enabled, the source tree of all subprojects used by the current build
will also be included in the final tarball. This is useful to distribute
self contained tarball that can be built offline (i.e. `--wrap-mode=nodownload`).
## Skip build and test with `--no-tests`
The `meson dist` command has a `--no-tests` option to skip build and
tests steps of generated packages. It can be used to not waste time
for example when done in CI that already does its own testing.
So with `--no-tests` you can tell Meson "Do not build and test generated
packages.".

Loading…
Cancel
Save