Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStart on Mach package #11210
Start on Mach package #11210
Conversation
highfive
commented
May 16, 2016
|
Heads up! This PR modifies the following files:
|
|
This fails tidy.
|
|
@edunham Oh sorry. :( I'm so accustomed to seeing this snippet of text that I don't notice unusual things in it anymore... |
| apk_path = binary_path + ".apk" | ||
| if not path.exists(apk_path): | ||
| result = Registrar.dispatch("package", context=self.context, release=release, dev=dev) | ||
| if result is not 0: |
This comment has been minimized.
This comment has been minimized.
frewsxcv
May 18, 2016
•
Member
The is binary operator is used to check references. i.e., (IIRC) it's possible for multiple instances of 0 to exist in memory, so this is not guaranteed to always pass. Whereas singletons, like None, True, and False only exist once in memory so is is okay. So this should maybe be an != operator instead
|
Reviewed 2 of 2 files at r1, 2 of 2 files at r2. Comments from Reviewable |
highfive
commented
May 31, 2016
|
New code was committed to pull request. |
|
@larsbergstrom Latest commits do naive packaging for OSX/Linux, including creating ./runservo.sh to invoke Servo with browserhtml. Next steps:
|
63d4672
to
79b983e
highfive
commented
May 31, 2016
|
New code was committed to pull request. |
|
@larsbergstrom It's all squashed up and ready for final review :) |
| @CommandProvider | ||
| class PackageCommands(CommandBase): | ||
| @Command('package', | ||
| description='Package Servo (currently, Android APK only)', |
This comment has been minimized.
This comment has been minimized.
|
After fixing the one total nit, please squash and r=me! |
|
|
@edunham Please fix tidy and r=me. |
| description='Install Servo (currently, Android only)', | ||
| category='package') | ||
| @CommandArgument('--release', '-r', action='store_true', | ||
| help='Package the release build') |
This comment has been minimized.
This comment has been minimized.
| @CommandArgument('--release', '-r', action='store_true', | ||
| help='Package the release build') | ||
| @CommandArgument('--dev', '-d', action='store_true', | ||
| help='Package the dev build') |
This comment has been minimized.
This comment has been minimized.
| os.close(runservo) | ||
| print("Creating tarball") | ||
| tar_path = '/'.join(dir_to_package.split('/')[:-1]) + '/' | ||
| tar_path += time.strftime('%Y-%m-%d-%H%M') + "-servo-tech-demo.tar.gz" |
This comment has been minimized.
This comment has been minimized.
aneeshusa
Jun 3, 2016
Member
Can we please use ISO 8601 format?
import datetime
datetime.utcnow().replace(microsecond=0).isoformat()
Ideally this would also indicate that this is UTC time in the printed representation, but Python 2 doesn't have datetime.timezone.utc, and I don't think an extra dependency or writing a UTC tzinfo subclass is worth it..
| if result != 0: | ||
| return result | ||
|
|
||
| print(["adb", "install", "-r", apk_path]) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
edunham
Jun 3, 2016
Author
Contributor
I believe this is still used frequently when debugging the Android builder
* Split package commands into their own file * Delete spurious files from build dir * Create runservo.sh to invoke servo with the right browserhtml incantation * Tar it all up with the date and time in the filename
highfive
commented
Jun 3, 2016
|
New code was committed to pull request. |
|
Latest changes fix tidy errors and switch to using ISO datetime format. |
|
I don't think the |
|
@aneeshusa I'd like to get a basic package functionality landed so we can add it to the build system -- in the long run there are a lot of areas for improvement. |
|
@bors-servo r+ |
|
|
Start on Mach package Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: - [ ] `./mach build -d` does not report any errors - these changes don't touch anything that mach build touches> - [ ] `./mach test-tidy --faster` does not report any errors - Tidy errors on some dependencies that I think we'll need for real `package` but aren't using for android - [X] These changes address #9918 (github issue number if applicable). Either: - [ ] There are tests for these changes OR - [x] These changes do not require tests because I don't think Mach has tests yet? Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11210) <!-- Reviewable:end -->
|
|
servo/servo#11210 recently updated `./mach package` to make it a first-class Mach command and add support for simple Linux packaging as well (in the form of tarballs). Android used to be the only packaging target supported, so a naked `./mach package` sufficed, but now we need to explicitly build the Android packaging.
…larsbergstrom Add --android option to ./mach package servo/servo#11210 recently updated `./mach package` to make it a first-class Mach command and add support for simple Linux packaging as well (in the form of tarballs). Android used to be the only packaging target supported, so a naked `./mach package` sufficed, but now we need to explicitly build the Android packaging. Another step for servo/servo#10339. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/401) <!-- Reviewable:end -->
edunham commentedMay 16, 2016
•
edited by larsbergstrom
Thank you for contributing to Servo! Please replace each
[ ]by[X]when the step is complete, and replace__with appropriate data:./mach build -ddoes not report any errors./mach test-tidy --fasterdoes not report any errorspackagebut aren't using for androidEither:
Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.
This change is