Upgrade path from git #108
Labels
No labels
Component: User interface
Component: Wymeditor
Help wanted
Level: Difficult
Level: Easy
Level: Moderate
Pagetype: Festival
Pagetype: Mailinglist
Pagetype: Peer reviewed article
Pagetype: Text
Privacy GDPR AVG
status: has conflicts
Status: Needs changes
Status: Needs discussion
Status: Needs review
Status: Ready to merge
Status: Waiting for response
Type: Bug
Type: Enhancement
Type: Question
Usecase: De Stadsbron
Usecase: Koppelting
Usecase: MeetjeStad
Value: Coders
Value: Security
Value: Users
Value: Visitors
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
harmen/hypha#108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement an admin command in settings to upgrade a hypha instance by pulling the latest commit from a branch in git:
This looks tricky to me, since it will only work in controlled cirumstances. In particular:
It does seem that each of these things can be tested from the commandline, so it might be feasible to implement this in a safe manner (and anyone that has a non-standard setup must then upgrade manually, but that is probably ok).
This might be useful code, it contains some wrappers to call git commands from PHP and has some output-parsing options.
https://github.com/czproject/git-php/blob/master/src/GitRepository.php
One extra caveat: When fetching using SSH, the SSH host key must be accepted. When running from inside the webserver, git runs as another user, with its own
~/.ssh/known_hosts, which likely does not know about the server SSH key yet. Even more tricky is that the defaultwww-dataon Debian has/var/wwwas its homedir, but cannot actually write there, so it fails to create~/.ssh.I can imagine some ways to handle this:
~/.ssh/config(which is typically not writeable...)./etc. This is a manual action, but only needs to happen once, so this is probably a good way to support SSH. The only tricky part is to detect that this is needed (but something like "You're not using HTTP, so you might need to setup a known hosts file").