-
Notifications
You must be signed in to change notification settings - Fork 99
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
Use the stored activate binary appropriate for target platform #14
Conversation
This should point to the correct path if the target platform differs fro the deploying platform.
This gets rid of the "current_exe" vestige that has stuck around from when this program was meant to be standalone; instead, we use the (already known) path to the activate-rs wrapper, which automatically uses the correct binary for the deploy target platform.
This gets rid of yet more code, so - win!
28801ad
to
a97069b
Compare
There's a slight issue if someone tries to run a |
This patch is fail-early and should make error messages a bit more clear:
Although I guess it can be submitted in a separate PR. |
Making it fail early is a great solution; you have push permissions to my branch, but I can commit it also (: |
Ah, ok, forgot about this feature of github :) I'll push this. |
One more thing that might make this less of a problem might be to find&document a good way of running the deploy via an |
We're using either |
Oooh, the latter sounds really good - I like that it all turns into |
(annoying prescriptivist hated by everyone joins the chat) We are trying to keep this repo REUSE compliant and track copyright information correctly, so, @antifuchs, would you mind adding an We should probably add this to our contributing guidelines. |
Hah, that's totally legit, @kirelagin. I'll check with my employer's legal team (who are currently enjoying a long weekend) to ensure I'm doing it right - will update this PR on Monday. |
Sounds great, thanks for understanding! Just to be clear, we do not require a CLA, assigning the copyright to us, or anything like that. We would just like to explicitly record for posterity that it is you who are the author (and thus the copyright holder) of what you authored :). However, all this applies only if you are writing this code on your own time. If you are doing this as part of your job, then you would need to get a permission from your employer to release your works under the license that we use (MPL-2.0), and the copyright header should contain not your, but your employer’s name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all really good stuff, but there is a lot more code we can get rid of thanks to this, such as the NotNixStored
error
Now that we don't copy `activate` from the same directory as `current_exe`, we can skip the check that the `current_exe` is reachable and in nix store.
Seems to have been removed by mistake in the previous cleanup
Checked with my legal friends at work & all is well, as expected - I added the copyright header & we're good to go. |
This addresses #13.
This PR rips out the
current_exe
field, preferring to write anactivate-rs
script that points to the platform-appropriate activation binary.Then, the deploy binary attempts to use that activate-rs script to activate the profile closure.
I've successfully run a deploy to an amd64 linux installation from my intel macOS machine, so I suspect this might work (: