diff options
author | Scott Moser <smoser@brickies.net> | 2016-08-10 01:41:33 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2016-08-10 01:41:33 -0400 |
commit | cb411dc3dd729c96e1e1aafbe4319269e3e390e3 (patch) | |
tree | abc540cf3ffa5f8fc3dfd7ca0cabca156f874c8b | |
parent | b384eb10f5035ab8faeccff069031f1e2903e8a7 (diff) | |
parent | 3aa094b6917240e6654993b34a48403cb7e14b02 (diff) | |
download | vyos-cloud-init-cb411dc3dd729c96e1e1aafbe4319269e3e390e3.tar.gz vyos-cloud-init-cb411dc3dd729c96e1e1aafbe4319269e3e390e3.zip |
Merge branch 'master' into ubuntu/devel
-rw-r--r-- | cloudinit/version.py | 2 | ||||
-rwxr-xr-x | tools/make-tarball | 6 | ||||
-rwxr-xr-x | tools/read-version | 21 |
3 files changed, 26 insertions, 3 deletions
diff --git a/cloudinit/version.py b/cloudinit/version.py index aa8ccd7e..6acada84 100644 --- a/cloudinit/version.py +++ b/cloudinit/version.py @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -__VERSION__ = "0.7.6" +__VERSION__ = "0.7.7" def version_string(): diff --git a/tools/make-tarball b/tools/make-tarball index d8705896..c150dd2f 100755 --- a/tools/make-tarball +++ b/tools/make-tarball @@ -55,5 +55,9 @@ if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then fi fi -git archive --format=tar.gz --prefix="$archive_base/" "$rev" > "$output" +TEMP_D=$(mktemp -d) +tar=${output##*/} +tar="$TEMP_D/${tar%.gz}" +git archive --format=tar --prefix="$archive_base/" "$rev" > "$tar" +gzip -9 -c "$tar" > "$output" echo "$output" diff --git a/tools/read-version b/tools/read-version index 85c62343..5ecf7247 100755 --- a/tools/read-version +++ b/tools/read-version @@ -26,6 +26,25 @@ def tiny_p(cmd, capture=True): return out +def which(program): + # Return path of program for execution if found in path + def is_exe(fpath): + return os.path.isfile(fpath) and os.access(fpath, os.X_OK) + + _fpath, _ = os.path.split(program) + if _fpath: + if is_exe(program): + return program + else: + for path in os.environ.get("PATH", "").split(os.pathsep): + path = path.strip('"') + exe_file = os.path.join(path, program) + if is_exe(exe_file): + return exe_file + + return None + + use_long = '--long' in sys.argv or os.environ.get('CI_RV_LONG') use_tags = '--tags' in sys.argv or os.environ.get('CI_RV_TAGS') output_json = '--json' in sys.argv @@ -33,7 +52,7 @@ output_json = '--json' in sys.argv src_version = ci_version.version_string() version_long = None -if os.path.isdir(os.path.join(_tdir, ".git")): +if os.path.isdir(os.path.join(_tdir, ".git")) and which("git"): flags = [] if use_tags: flags = ['--tags'] |