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
brew package #12688
Merged
+145
−23
Merged
brew package #12688
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
| @@ -0,0 +1,21 @@ | ||
| # This Source Code Form is subject to the terms of the Mozilla Public | ||
| # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| # file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| class ServoBin < Formula | ||
| desc "Servo, the Parallel Browser Engine Project (binary version)" | ||
| homepage "http://servo.org" | ||
| url "PACKAGEURL" | ||
| version "VERSION" | ||
| sha256 "SHA" | ||
|
|
||
| bottle :unneeded | ||
|
|
||
| def install | ||
| prefix.install "bin", "libexec", "resources" | ||
| end | ||
|
|
||
| test do | ||
| system bin/"servo", "-o", "/dev/null", "-x", "http://example.com" | ||
| end | ||
| end |
| @@ -0,0 +1,47 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # This Source Code Form is subject to the terms of the Mozilla Public | ||
| # License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| # file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| SCRIPTDIR=${PWD}/$(dirname ${0}) | ||
| cd "${SCRIPTDIR}/../.." | ||
|
|
||
| PACKAGEPATH=$(ls -t target/brew/servo-????-??-??.tar.gz | head -n 1) | ||
| PACKAGENAME=$(basename ${PACKAGEPATH}) | ||
| REGEX="s/servo-.*\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).tar.gz/\1.\2.\3/p" | ||
| VERSION=$(echo ${PACKAGENAME}| sed -n "${REGEX}") | ||
| SHA=$(shasum -a 256 ${PACKAGEPATH} | sed -e 's/ .*//') | ||
| GIT="https://${TOKEN}@github.com/servo/homebrew-servo.git" | ||
|
|
||
| # See upload_nightly.sh | ||
| PACKAGEURL="https://download.servo.org/nightly/macbrew/${PACKAGENAME}" | ||
|
|
||
| if [[ -z ${VERSION} ]]; then | ||
| echo "Package doesn't havent the right format: ${PACKAGENAME}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| TMP_DIR=$(mktemp -d -t homebrew-servo) | ||
| cd ${TMP_DIR} | ||
| echo ${TMP_DIR} | ||
|
|
||
| echo "Cloning" | ||
| git clone ${GIT} | ||
| cd homebrew-servo | ||
|
|
||
| # Not using "/" as it's used in PACKAGEURL | ||
| cat ${SCRIPTDIR}/servo-binary-formula.rb.in | sed \ | ||
| "s|PACKAGEURL|${PACKAGEURL}|g | ||
| s|SHA|${SHA}|g | ||
| s|VERSION|${VERSION}|g" > Formula/servo-bin.rb | ||
|
|
||
| git add ./Formula/servo-bin.rb | ||
| git commit -m "Version bump: ${VERSION}" | ||
|
|
||
| git push -q ${GIT} master | ||
| rm -rf ${TMP_DIR} |
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
I don't understand why
'servo' in dylibwas here in the first place.