aboutsummaryrefslogtreecommitdiff
path: root/xS/xS-gen-version.awk
blob: 1312a63f811e77405d8cdf192fad2ad16c6d1642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# xS-gen-version.awk: extract version information from the CMake script
#
# Copyright (c) 2022, Přemysl Eric Janouch <p@janouch.name>
# SPDX-License-Identifier: 0BSD

Command == "project" {
	for (i = 2; i in Args; i++)
		if (Args[i] == "VERSION") {
			print "package main"
			print ""
			print "const projectVersion = `" Args[++i] "`"
			exit
		}
}