Skip to content
Snippets Groups Projects
Commit 0a1d01b9 authored by Simon McVittie's avatar Simon McVittie
Browse files

build: Write .tarball-version into source tarballs


We also write this into subprojects/container-runtime so that
populate-depot.py can find it there. This will enable populate-depot.py
to learn its own version number when used by unpacking a
steam-runtime-tools source tarball, rather than from git.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 70fd2457
Branches
Tags
No related merge requests found
......@@ -2,6 +2,7 @@
# SPDX-License-Identifier: MIT
.*.sw?
.tarball-version
/.cache
/.mypy_cache
/_build*
......
#!/usr/bin/python3
# Copyright © 2022 Collabora Ltd.
# SPDX-License-Identifier: MIT
import os
import os.path
import sys
for d in ('.', 'subprojects/container-runtime'):
with open(
os.path.join(os.environ['MESON_DIST_ROOT'], d, '.tarball-version'),
'w'
) as writer:
writer.write(sys.argv[1] + '\n')
......@@ -45,6 +45,10 @@ endif
%:
dh $@ $(dh_options)
override_dh_clean:
dh_clean
MESON_DIST_ROOT=$(CURDIR) build-aux/set-version.py $(DEB_VERSION_UPSTREAM)
# We open-code the Meson clean, configure, build, test, install steps
# because the debhelper in SteamRT 1 'scout' is too old to have built-in
# knowledge of Meson.
......
......@@ -414,4 +414,6 @@ if meson.version().version_compare('>=0.58')
meson.add_devenv(uninstalled_env)
endif
meson.add_dist_script('build-aux/set-version.py', version)
# vim:set sw=2 sts=2 et:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment