Automatic versioning for aptly

New version format:

* for releases, `x.y.z` (follows tag without leading `v`)
* for nightly builds, `x.y.z+N+hash` (previous version, not the upcoming one)

This means that each nightly build `aptly` would report
correct version now.

Version is now complied into the aptly binary, system tests
automatically check for current version, no need to update them
anymore.
This commit is contained in:
Andrey Smirnov committed 2017-03-25 00:18:45 +03:00
1 parent 91219e3a0a
commit 2943422d5d
13 files changed
+43 -13

No files matched your search

+4 -3
View File
@@ -1,10 +1,11 @@
import requests_unixsocket
import time
import urllib
import os
import os.path
from lib import BaseTest
class SystemdAPIHandoverTest(BaseTest):
aptly_server = None
socket_path = "/tmp/_aptly_systemdapihandovertest.sock"
@@ -37,9 +38,9 @@ class SystemdAPIHandoverTest(BaseTest):
Verify we can listen on a unix domain socket.
"""
def check(self):
if self.aptly_server == None:
if self.aptly_server is None:
print("Skipping test as we failed to setup a listener.")
return
session = requests_unixsocket.Session()
r = session.get('http+unix://%s/api/version' % urllib.quote(self.socket_path, safe=''))
self.check_equal(r.json(), {'Version': '0.9.8~dev'})
self.check_equal(r.json(), {'Version': os.environ['APTLY_VERSION']})