summaryrefslogtreecommitdiff
path: root/scripts/build-vagrant-libvirt-box
diff options
context:
space:
mode:
authorYuya Kusakabe <yuya.kusakabe@gmail.com>2018-05-01 15:56:51 +0900
committerYuya Kusakabe <yuya.kusakabe@gmail.com>2018-05-01 15:57:01 +0900
commit40ff4c4fcfdf2d7961eb73bc0414bceef7f17ded (patch)
tree7d573b48d004df21eebfe2e94829eef2a117a987 /scripts/build-vagrant-libvirt-box
parent4ef9a8fc1a3edb7feb9049b2d53eb3fd07c82dfa (diff)
downloadvyos-build-40ff4c4fcfdf2d7961eb73bc0414bceef7f17ded.tar.gz
vyos-build-40ff4c4fcfdf2d7961eb73bc0414bceef7f17ded.zip
Fix build script for vagrant libvirt box
See Vagrant Version Constraints: https://www.vagrantup.com/docs/boxes/versioning.html#version-constraints
Diffstat (limited to 'scripts/build-vagrant-libvirt-box')
-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