summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-05-17 07:38:05 +0200
committerDaniil Baturin <daniil@baturin.org>2018-05-17 07:38:05 +0200
commit7ca79fa865fd88701b0bdedcd1d7cc1b8d4cad17 (patch)
tree4fd19238136c98932e19eb7436ad85e50f095f5c
parent94cfaf7c9223b4e6a5fab63d28160f6c68bdc2dc (diff)
parentd9e596d0c6c4c78cb664ab527e7fbd58a68b2d96 (diff)
downloadvyos-build-7ca79fa865fd88701b0bdedcd1d7cc1b8d4cad17.tar.gz
vyos-build-7ca79fa865fd88701b0bdedcd1d7cc1b8d4cad17.zip
Merge branch 'current' of github.com:vyos/vyos-build into current
-rwxr-xr-xscripts/build-vagrant-libvirt-box7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/build-vagrant-libvirt-box b/scripts/build-vagrant-libvirt-box
index 4d3482df..6db77c2a 100755
--- a/scripts/build-vagrant-libvirt-box
+++ b/scripts/build-vagrant-libvirt-box
@@ -54,9 +54,10 @@ fi
PROVIDER=libvirt
# Create version
-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")
+major=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 5- | rev)
+sub=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 3-4 | rev)
+minor=$(cat build/version | cut -d'+' -f2 | cut -d'-' -f1 | rev | cut -c 1-2 | rev)
+version=$(echo "$major.$sub.$minor")
curl -XPOST -d "version[version]=${version}" \
https://app.vagrantup.com/api/v1/box/${VAGRANT_BOX_NAME}/versions?access_token=${VAGRANT_CLOUD_ACCESS_TOKEN}
echo