Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving datetimestamping responsibilities from mach package #14058

Merged
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -16,10 +16,11 @@ usage() {


upload() {
local package_filename
package_filename="$(basename "${2}")"
local nightly_filename nightly_timestamp
nightly_timestamp="$(date -u +"%Y-%m-%dT%H-%M-%SZ")"
nightly_filename="${nightly_timestamp}-$(basename "${2}")"
local -r nightly_upload_dir="s3://servo-builds/nightly/${1}"
local -r package_upload_path="${nightly_upload_dir}/${package_filename}"
local -r package_upload_path="${nightly_upload_dir}/${nightly_filename}"
s3cmd --mime-type="application/octet-stream" \
put "${2}" "${package_upload_path}"
s3cmd cp "${package_upload_path}" "${nightly_upload_dir}/servo-latest.${3}"
@@ -19,7 +19,6 @@
import mako.template

from mach.registrar import Registrar
from datetime import datetime

from mach.decorators import (
CommandArgument,
@@ -155,7 +154,6 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=

dir_to_build = '/'.join(binary_path.split('/')[:-1])
dir_to_root = '/'.join(binary_path.split('/')[:-3])
now = datetime.utcnow()

print("Creating Servo.app")
dir_to_dmg = '/'.join(binary_path.split('/')[:-2]) + '/dmg'
@@ -212,9 +210,7 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
print("Creating dmg")
os.symlink('/Applications', dir_to_dmg + '/Applications')
dmg_path = '/'.join(dir_to_build.split('/')[:-1]) + '/'
time = now.replace(microsecond=0).isoformat()
time = time.replace(':', '-')
dmg_path += time + "-servo-tech-demo.dmg"
dmg_path += "servo-tech-demo.dmg"
try:
subprocess.check_call(['hdiutil', 'create', '-volname', 'Servo', dmg_path, '-srcfolder', dir_to_dmg])
except subprocess.CalledProcessError as e:
@@ -229,7 +225,7 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
dir_to_tar = '/'.join(dir_to_build.split('/')[:-1]) + '/brew/'
if not path.exists(dir_to_tar):
os.makedirs(dir_to_tar)
tar_path = dir_to_tar + now.strftime("servo-%Y-%m-%d.tar.gz")
tar_path = dir_to_tar + "servo.tar.gz"
if path.exists(dir_to_brew):
print("Cleaning up from previous packaging")
delete(dir_to_brew)
@@ -316,9 +312,7 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger=
os.close(runservo)

print("Creating tarball")
time = datetime.utcnow().replace(microsecond=0).isoformat()
time = time.replace(':', "-")
tar_path = path.join(self.get_target_dir(), time + '-servo-tech-demo.tar.gz')
tar_path = path.join(self.get_target_dir(), 'servo-tech-demo.tar.gz')

archive_deterministically(dir_to_temp, tar_path, prepend_path='servo/')

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.