From dec67cc9a39eee9f220411fd61ba20df6b6466e8 Mon Sep 17 00:00:00 2001 From: Yuya Kusakabe Date: Tue, 15 May 2018 11:07:55 +0900 Subject: Fix version number for vagrant libvirt box --- scripts/build-vagrant-libvirt-box | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build-vagrant-libvirt-box b/scripts/build-vagrant-libvirt-box index 070b3ef..4d3482d 100755 --- a/scripts/build-vagrant-libvirt-box +++ b/scripts/build-vagrant-libvirt-box @@ -54,8 +54,9 @@ fi PROVIDER=libvirt # Create version -date=$(date -u +%Y%m%d) -version=$(echo "$date.0.0") +major=$(cat build/version | cut -d'+' -f2 | rev | cut -c 5- | rev) +sub=$(cat build/version | cut -d'+' -f2 | rev | cut -c 1-4 | rev) +version=$(echo "$major.$sub.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 -- cgit v1.2.3