diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-05-05 20:29:33 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-05-05 20:29:33 +0200 |
commit | dea202e366346dae6b39190c49b6076e3e2859c6 (patch) | |
tree | 54f689711a1fc2707df8f9146d205d6715863c8c | |
parent | fb1dc1fa29e7a0b028584ba02dbfaf7555ee40d9 (diff) | |
parent | bc454be832aef40c58180b2175e2cd573a98daf1 (diff) | |
download | vyos-build-dea202e366346dae6b39190c49b6076e3e2859c6.tar.gz vyos-build-dea202e366346dae6b39190c49b6076e3e2859c6.zip |
Merge branch 'current' of github.com:vyos/vyos-build into current
-rwxr-xr-x | scripts/build-vagrant-libvirt-box | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/build-vagrant-libvirt-box b/scripts/build-vagrant-libvirt-box index 7aff4eda..070b3ef7 100755 --- a/scripts/build-vagrant-libvirt-box +++ b/scripts/build-vagrant-libvirt-box @@ -54,16 +54,19 @@ 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} +urlencoded_version=$(cat build/version | sed 's/+/%2B/') +curl -XPOST -d "provider[name]=${PROVIDER}" -d "provider[url]=${VAGRANT_BOX_BASE_URL}/vyos-${urlencoded_version}-vagrant-${PROVIDER}.box" \ + 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 |