From fe818addd02cb27fd390a703dec8006f57ba7bc8 Mon Sep 17 00:00:00 2001 From: Jacob Thomas Date: Fri, 1 Jul 2016 10:48:10 -0600 Subject: Change colons to dashes in package name --- python/servo/package_commands.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'python/servo/package_commands.py') diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 6569598189f..37baa997de3 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -142,8 +142,9 @@ class PackageCommands(CommandBase): print("Creating dmg") os.symlink('/Applications', dir_to_dmg + '/Applications') dmg_path = '/'.join(dir_to_build.split('/')[:-1]) + '/' - dmg_path += datetime.utcnow().replace(microsecond=0).isoformat() - dmg_path += "-servo-tech-demo.dmg" + time = datetime.utcnow().replace(microsecond=0).isoformat() + time = time.replace(':', '-') + dmg_path += time + "-servo-tech-demo.dmg" try: subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg]) except subprocess.CalledProcessError as e: @@ -181,8 +182,9 @@ class PackageCommands(CommandBase): os.close(runservo) print("Creating tarball") tar_path = '/'.join(dir_to_package.split('/')[:-1]) + '/' - tar_path += datetime.utcnow().replace(microsecond=0).isoformat() - tar_path += "-servo-tech-demo.tar.gz" + time = datetime.utcnow().replace(microsecond=0).isoformat() + time = time.replace(':', "-") + tar_path += time + "-servo-tech-demo.tar.gz" with tarfile.open(tar_path, "w:gz") as tar: # arcname is to add by relative rather than absolute path tar.add(dir_to_package, arcname='servo/') -- cgit v1.2.3