-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Allow extensions to be compiled from GitHub sources #399
Allow extensions to be compiled from GitHub sources #399
Conversation
@alcaeus Thanks for working on this. Installing extensions from source was on the roadmap. 🚀
|
@shivammathur that sounds like a great idea, as it presumably makes it much easier to customize configure args via the build matrix. Granted, we're more likely to want to do that for the extension's own builds than a consuming library, but still nice to have the option. |
@shivammathur thanks for your feedback. I've applied the suggestions from code review. Please let me know if the checks in extensions.ts can be simplified - I'm not entirely happy with the duplicate regex evaluation, especially since that code can't be covered.
|
@alcaeus Awesome,
|
@shivammathur Just a heads up, it will be a few days before I can return to this. I haven't forgotten but have to rest for a few days. |
@alcaeus Take your time. Hope you are feeling well. |
8173e70
to
19593b9
Compare
@shivammathur thanks! I've rebased on develop and removed the superfluous |
Allow extensions to be compiled from GitHub sources
Allow extensions to be compiled from GitHub sources
Allow extensions to be compiled from GitHub sources
name: 🎉 New Feature
about: Allow extensions to be compiled from GitHub sources
labels: enhancement
A Pull Request should be associated with a Discussion.
Note: no discussion available as I built this for my own needs and want to start a discussion based on the changes I made.
Description
This PR allows installing extensions from source. This is done by using a special extension format of the form
<extension>-<org>/<repo>@<version>
. Currently, only GitHub is supported and the repository is checked out usinggit clone --recurse-submodules -b <version> https://github.com/<org>/<repo>
. This is supported on Linux and OSX, but not on Windows environments.The rationale for adding this was that I didn't want to have separate steps depending on what extension version to install. This way, I can provide the repository URL and branch name as version string, allowing installing stable versions and compiling from source in a single step in a matrix. This was inspired by the leftover
install_extension_from_source
, which this PR also removes as it's unused (and replaced by this PR).npm run format
before the commit.npm run lint
before the commit.npm run release
before the commit.npm test
returns with no unit test errors and all code covered.Further discussion
git clone
but could be supported as well.configure
? If so, this might require more changes to the action (including potentially changing the format of theextensions
input)shivammathur/cache-extensions
. I assume there will be issues if somebody installedext-org/repo@master
and the commit hash changes before the cache is invalidated. This needs documentation at the very least. This can be worked around by supporting commit hashes (see above).Let me know if you have any concerns about adding this, I'm happy to talk about potential alternatives.