From 40ff4c4fcfdf2d7961eb73bc0414bceef7f17ded Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Tue, 1 May 2018 15:56:51 +0900 Subject: Fix build script for vagrant libvirt box See Vagrant Version Constraints: https://www.vagrantup.com/docs/boxes/versioning.html#version-constraints --- scripts/build-vagrant-libvirt-box | 8 +++++--- 1 file 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 -- cgit v1.2.3