mirror of https://github.com/zulip/zulip.git
install: Use the initially-cloned repo as the base /srv/zulip.git.
This ensures that the next `upgrade-zulip-from-git` has access to the
commit history of the initial install, if it was from a forked
repository. `/home/zulip/deployments/current` and `/srv/zulip.git`
are not quite organized into the steady-state that they will have
after one `upgrade-zulip-from-git`:
- `/home/zulip/deployments/current` is its own clone, not a worktree
- `/srv/zulip.git` has an origin of `/home/zulip/deployments/current`
- `remote.origin.mirror` is set on `/srv/zulip.git`
- `remote.origin.fetch` is `+refs/*:refs/*`
All but the first are automatically cleaned up by
`upgrade-zulip-from-git` when it is next run, using the code added in
30457ecd02
. The additional complexity of making an existing
independent clone into a worktree seem not worth solving the first
point.
This commit is contained in:
parent
1276653ec8
commit
ec4bfd7c78
|
@ -555,6 +555,9 @@ cp -rT "$deploy_path"/prod-static/serve /home/zulip/prod-static
|
|||
chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py
|
||||
|
||||
if ! [ -e /home/zulip/deployments/current/zulip-git-version ]; then
|
||||
mkdir /srv/zulip.git
|
||||
chown zulip:zulip /srv/zulip.git
|
||||
su zulip -c 'git clone --bare --mirror /home/zulip/deployments/current /srv/zulip.git'
|
||||
su zulip -c 'cd /home/zulip/deployments/current && ./scripts/lib/update-git-upstream && ./tools/cache-zulip-git-version'
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue