@@ -33,6 +33,7 @@ Usage: coreos-assembler build --help
33
33
--prepare-only Do not actually build, only set things up so that `rpm-ostree compose image` works.
34
34
--tag TAG Set the given tag in the build metadata
35
35
--version=VERSION Use the given version instead of following the manifest's `automatic-version-prefix`.
36
+ --versionary Use the versionary script from the source config to drive version.
36
37
--skip-config-archive Disable creating a tar.gz archive of the config repo.
37
38
--autolock=VERSION If no base lockfile used, create one from any arch build of `VERSION`.
38
39
Note this is automatically enabled when adding to an existing multi-arch
@@ -54,14 +55,15 @@ FETCH=
54
55
SKIP_PRUNE=0
55
56
PREPARE_ONLY=0
56
57
VERSION=
58
+ VERSIONARY=
57
59
PARENT=
58
60
PARENT_BUILD=
59
61
TAG=
60
62
STRICT=
61
63
CONFIG_ARCHIVE=1
62
64
AUTOLOCK_VERSION=
63
65
rc=0
64
- options=$( getopt --options hfFt: --longoptions tag:,help,fetch,force,version:,parent:,parent-build:,delay-meta-merge,force-nocache,force-image,skip-prune,prepare-only,strict,skip-config-archive,autolock: -- " $@ " ) || rc=$?
66
+ options=$( getopt --options hfFt: --longoptions tag:,help,fetch,force,version:,parent:,parent-build:,delay-meta-merge,force-nocache,force-image,skip-prune,prepare-only,strict,skip-config-archive,autolock:,versionary -- " $@ " ) || rc=$?
65
67
[ $rc -eq 0 ] || {
66
68
print_help
67
69
exit 1
@@ -101,6 +103,9 @@ while true; do
101
103
shift
102
104
VERSION=$1
103
105
;;
106
+ --versionary)
107
+ VERSIONARY=1
108
+ ;;
104
109
# XXX: to remove once --parent-build is plumbed through
105
110
--parent)
106
111
shift
@@ -143,6 +148,12 @@ if [ $# -eq 0 ]; then
143
148
set -- qemu
144
149
fi
145
150
151
+ if [ -z " ${VERSION} " ] && [ -n " ${VERSIONARY} " ]; then
152
+ # let error out if file does not exist
153
+ VERSION=$( src/config/versionary)
154
+ echo " New version will be ${VERSION} "
155
+ fi
156
+
146
157
# sanity check the targets and aggregate into a set
147
158
declare -A targets=( )
148
159
for target in " $@ " ; do
0 commit comments