Skip to content

Commit a4c63b1

Browse files
committed
Restore support for migration path and setting version
Signed-off-by: PeakKS <[email protected]>
1 parent 3034902 commit a4c63b1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/meson.build

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ sources = files(
3636
'pkg/version/version.go',
3737
)
3838

39+
go_tags = []
40+
if migration_path_for_coreos_toolbox
41+
go_tags += 'migration_path_for_coreos_toolbox'
42+
endif
43+
3944
toolbox_go = custom_target(
4045
'toolbox',
4146
command: [
@@ -44,6 +49,10 @@ toolbox_go = custom_target(
4449
'-C', meson.current_source_dir(),
4550
'-trimpath',
4651
'-buildmode=c-archive',
52+
'-tags', ','.join(go_tags),
53+
'-ldflags',
54+
'-X github.com/containers/toolbox/pkg/version.currentVersion='
55+
+ meson.project_version(),
4756
'-o', meson.project_build_root() + '/@OUTPUT@',
4857
'@INPUT@',
4958
],

0 commit comments

Comments
 (0)