mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Change colons to dashes in package name
This commit is contained in:
parent
210265d30f
commit
fe818addd0
1 changed files with 6 additions and 4 deletions
|
@ -142,8 +142,9 @@ class PackageCommands(CommandBase):
|
||||||
print("Creating dmg")
|
print("Creating dmg")
|
||||||
os.symlink('/Applications', dir_to_dmg + '/Applications')
|
os.symlink('/Applications', dir_to_dmg + '/Applications')
|
||||||
dmg_path = '/'.join(dir_to_build.split('/')[:-1]) + '/'
|
dmg_path = '/'.join(dir_to_build.split('/')[:-1]) + '/'
|
||||||
dmg_path += datetime.utcnow().replace(microsecond=0).isoformat()
|
time = datetime.utcnow().replace(microsecond=0).isoformat()
|
||||||
dmg_path += "-servo-tech-demo.dmg"
|
time = time.replace(':', '-')
|
||||||
|
dmg_path += time + "-servo-tech-demo.dmg"
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg])
|
subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg])
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
@ -181,8 +182,9 @@ class PackageCommands(CommandBase):
|
||||||
os.close(runservo)
|
os.close(runservo)
|
||||||
print("Creating tarball")
|
print("Creating tarball")
|
||||||
tar_path = '/'.join(dir_to_package.split('/')[:-1]) + '/'
|
tar_path = '/'.join(dir_to_package.split('/')[:-1]) + '/'
|
||||||
tar_path += datetime.utcnow().replace(microsecond=0).isoformat()
|
time = datetime.utcnow().replace(microsecond=0).isoformat()
|
||||||
tar_path += "-servo-tech-demo.tar.gz"
|
time = time.replace(':', "-")
|
||||||
|
tar_path += time + "-servo-tech-demo.tar.gz"
|
||||||
with tarfile.open(tar_path, "w:gz") as tar:
|
with tarfile.open(tar_path, "w:gz") as tar:
|
||||||
# arcname is to add by relative rather than absolute path
|
# arcname is to add by relative rather than absolute path
|
||||||
tar.add(dir_to_package, arcname='servo/')
|
tar.add(dir_to_package, arcname='servo/')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue