Skip to content

Commit b6a52f1

Browse files
committed
cmd-build-with-buildah: refactor versionary logic
No functional change, just reorganizing a bit and adding comments.
1 parent 47ad985 commit b6a52f1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/cmd-build-with-buildah

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,17 @@ build_with_buildah() {
119119
fi
120120

121121
if [ -z "${VERSION}" ]; then
122-
# let error out if file does not exist
122+
# If we were asked to run versionary then we just run it
123+
# and it will give us a production build ID. If we were't
124+
# asked to run versionary we still run it, but request a
125+
# "development" build ID.
123126
if [ -z "${VERSIONARY}" ]; then
124-
VERSION=$(src/config/versionary --dev)
127+
dev_arg='--dev'
125128
else
126-
VERSION=$(src/config/versionary)
129+
dev_arg=''
127130
fi
131+
# Call versionary. Let it error out if file does not exist.
132+
VERSION=$(src/config/versionary ${dev_arg})
128133
fi
129134

130135
if [ -e "builds/$VERSION/${arch}" ]; then

0 commit comments

Comments
 (0)