aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
Diffstat (limited to 'libdino')
-rw-r--r--libdino/meson.build7
-rw-r--r--libdino/version.py1
2 files changed, 5 insertions, 3 deletions
diff --git a/libdino/meson.build b/libdino/meson.build
index 42910463..aa88e979 100644
--- a/libdino/meson.build
+++ b/libdino/meson.build
@@ -1,10 +1,11 @@
# version_vala
-dot_git = meson.current_source_dir() / '../.git'
-version_file = meson.current_source_dir() / '../VERSION'
-command = [prog_python, files('version.py'), version_file, '--git-repo', meson.current_source_dir()]
+version_py = files('version.py')[0]
+command = [prog_python, version_py.full_path(), version_file_path, '--git-repo', meson.current_source_dir()]
if prog_git.found()
command += ['--git', prog_git]
endif
+# We add those dummy args to ensure meson sees the dependency
+command += ['--', version_py, version_file]
version_vala = vcs_tag(command: command, input: 'src/version.vala.in', output: 'version.vala', replace_string: '%VERSION%')
# libdino
diff --git a/libdino/version.py b/libdino/version.py
index d057ddf2..ca779898 100644
--- a/libdino/version.py
+++ b/libdino/version.py
@@ -56,6 +56,7 @@ def main():
p.add_argument("--git", help="Path to git executable", default="git")
p.add_argument("version_file", metavar="VERSION_FILE",
help="Use this file's contents as version if the file exists")
+ p.add_argument("ignored", nargs="*", help=argparse.SUPPRESS)
args = p.parse_args()
version = compute_version(args.version_file, args.git_repo, args.git)
print(version)