mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-27 13:57:26 +03:00
meson: add git-snapshot target
The output is systemd-<sha1abbrev>.tar.gz in source root.
This commit is contained in:
parent
ad68714d5c
commit
dd6ab3df74
19
meson.build
19
meson.build
@ -2321,3 +2321,22 @@ if git.found()
|
|||||||
'git-contrib',
|
'git-contrib',
|
||||||
command : [meson_git_contrib_sh])
|
command : [meson_git_contrib_sh])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if git.found()
|
||||||
|
git_head = run_command(
|
||||||
|
git,
|
||||||
|
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||||
|
'rev-parse', 'HEAD']).stdout().strip()
|
||||||
|
git_head_short = run_command(
|
||||||
|
git,
|
||||||
|
['--git-dir=@0@/.git'.format(meson.source_root()),
|
||||||
|
'rev-parse', '--short=7', 'HEAD']).stdout().strip()
|
||||||
|
|
||||||
|
run_target(
|
||||||
|
'git-snapshot',
|
||||||
|
command : ['git', 'archive',
|
||||||
|
'-o', '@0@/systemd-@1@.tar.gz'.format(meson.source_root(),
|
||||||
|
git_head_short),
|
||||||
|
'--prefix', 'systemd-@0@/'.format(git_head),
|
||||||
|
'HEAD'])
|
||||||
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user