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

Rewrite hooks from console #3796

Closed
schneefux opened this issue Oct 22, 2016 · 6 comments
Closed

Rewrite hooks from console #3796

schneefux opened this issue Oct 22, 2016 · 6 comments

Comments

@schneefux
Copy link

I am packaging Gogs for NixOS.
With every update of the Gogs package, the Gogs binary path changes so that it is necessary to rewrite all git hooks.
Can you provide a shell command, for example gogs admin rewrite-hooks so that this can be done automatically by NixOS?

@ghost
Copy link

ghost commented Oct 22, 2016

I don't remember the binary path changing, is there a special way you are compiling it?

@Mic92
Copy link

Mic92 commented Oct 22, 2016

@LefsFlarey on nixos, we store every package with the scheme /nix/store/<hash>-<package>-<version>. This way we resolve version conflicts between packages, rollback to older version and it allows unprivileged user to install their own packages.

@ghost
Copy link

ghost commented Oct 22, 2016

I see, in that case, would a solution like symlinking it to a standard path regardless of versions solve it?

@Mic92
Copy link

Mic92 commented Oct 22, 2016

As long as the old gogs service exists, the referenced binary should be not garbage-collected.
So it would sufficient to update gogs hooks, when the corresponding service is started/restarted. We could also solve this on our own using sed, I think.

@ghost
Copy link

ghost commented Oct 22, 2016

I was thinking of more of having a python like structure, where all python version are symlinked to simpler executable names. There are, after all, no incompatibilities between Gogs versions and repositories.

Nevertheless, you guys do what you guys gotta do ^_^

@knedlsepp
Copy link
Contributor

I've made a PR for this feature: #4813

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants