summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build-vagrant-libvirt-box8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/build-vagrant-libvirt-box b/scripts/build-vagrant-libvirt-box
index 7aff4eda..95ea9d4b 100755
--- a/scripts/build-vagrant-libvirt-box
+++ b/scripts/build-vagrant-libvirt-box
@@ -54,16 +54,18 @@ fi
PROVIDER=libvirt
# Create version
-curl -XPOST -d "version[version]=${VERSION}" \
+date=$(date -u +%Y%m%d)
+version=$(echo "$date.0.0")
+curl -XPOST -d "version[version]=${version}" \
https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/versions?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
echo
# Create provider
curl -XPOST -d "provider[name]=${PROVIDER}" -d "provider[url]=${VAGRANT_BOX_BASE_URL}/vyos-${VERSION}-vagrant-${PROVIDER}.box" \
- https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${VERSION}/providers?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
+ https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${version}/providers?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
echo
# Release version
curl -XPUT \
- https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${VERSION}/release?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
+ https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/version/${version}/release?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
echo