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

Add servo-latest on upload-nightly #12004

Merged
merged 1 commit into from Jul 1, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -12,7 +12,12 @@ usage() {


upload() {
s3cmd put "${2}" "s3://servo-builds/nightly/${1}/"
local package_filename
package_filename="$(basename "${2}")"
local -r nightly_upload_dir="s3://servo-builds/nightly/${1}"
local -r package_upload_path="${nightly_upload_dir}/${package_filename}"
s3cmd put "${2}" "${package_upload_path}"
s3cmd cp "${package_upload_path}" "${nightly_upload_dir}/servo-latest.${3}"
}


@@ -22,17 +27,21 @@ main() {
return 1
fi

local platform package
local platform package extension
platform="${1}"

if [[ "${platform}" == "android" ]]; then
package=target/arm-linux-androideabi/release/*.apk
extension=apk
package=target/arm-linux-androideabi/release/*."${extension}"
elif [[ "${platform}" == "linux" ]]; then
package=target/*.tar.gz
extension=tar.gz
package=target/*."${extension}"
elif [[ "${platform}" == "mac" ]]; then
package=target/*.dmg
extension=dmg
package=target/*."${extension}"
elif [[ "${platform}" == "windows" ]]; then
package=target/*.tar.gz
extension=tar.gz
package=target/*."${extension}"
else
usage >&2
return 1
@@ -41,7 +50,7 @@ main() {
# Lack of quotes on package allows glob expansion
# Note that this is not robust in the case of embedded spaces
# TODO(aneeshusa): make this glob robust using e.g. arrays or Python
upload "${platform}" ${package}
upload "${platform}" ${package} "${extension}"
}

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