Closed randomsock closed 9 years ago
Update refs pulls down new commits from the upstream git repository.
Do you have new commits in the upstream repo that aren't arriving?
Not sure whether this is a bug or misunderstanding - if I click Update refs, it says "Application updated" but doesn't actually update anything. In the brief progress window, I can see it's talking about a previous commit. If I click Set ref, and re-select the same origin/HEAD, the progress window shows it's changed from the previous to the current HEAD, and then does update the app properly. This is reproducible.
Guvnor does a fetch of the upstream repo history but doesn't merge it into the currently checked out ref. Maybe it should, this would be less confusing.
Ah, ok. yeah that would be better. Or, separate the two: have an additional guv update
or guv upapp
or something. It is confusing at the moment because it does kind of both and neither, for example:
In my test app, Stash shows one branch only: master
Latest 2 commits:
b045dad Current commit message ... 2c39cc0 Previous commit message ... ...
updaterefs
only sees the previous commit and doesn't update anything at all:
-bash-$ guv updaterefs myapp
HEAD is now at 2c39cc0 Previous commit message ...
From ssh://stash.../myapp
2c39cc0..b045dad master -> origin/master
If I setref
to exactly the same as it already is, it eventually updates the app:
-bash-$ guv ref myapp
refs/remotes/origin/HEAD
-bash-$ guv setref myapp refs/remotes/origin/HEAD
HEAD is now at 2c39cc0 Previous commit message ...
Previous HEAD position was 2c39cc0... Previous commit message ...
HEAD is now at b045dad... Current commit message ...
... then npm
proceeds to rebuild as expected.
Yep, worse it won't update local tracking branches even after switching refs back and forward because it doesn't merge, only fetches. Definitely a bug. I've got a fix though, will get it in this evening.
Is there any way to automate doing an npm update after an app is updated from git? On Tue, Apr 21, 2015 at 9:08 AM, Alex Potsides notifications@github.com wrote:
Yep, worse it won't update local tracking branches even after switching refs back and forward because it doesn't merge, only fetches. Definitely a bug. I've got a fix though, will get it in this evening.
— Reply to this email directly or view it on GitHub https://github.com/tableflip/guvnor/issues/63#issuecomment-94787336.
@TomKaltz It does already - that's a great thing about it which is why I'm keen to see the app update work, because then with the guv-web remote access you can stop, update, restart and monitor without having to expose access to the server - just need to work out best practice for hooking in the testing next.
I've just released 3.5.9 - give that a go. It changes how git repos are handled so that changes to the current ref should be reflected on the filesystem when you hit update.
You may need to remove and re-add any existing apps.
Top banana!
I did remove and re-add just to start from a clean position. Then committed a change and guv updaterefs
spotted that, updated the code correctly and rebuilt it.
Thanks a lot.
One really minor glitch, though harmless, if you updaterefs
and the HEAD hasn't moved so you're still up-to-date, then it still rebuilds everything. I'm going to close this anyway because it's fixed, but figured I'd just let you know about that.
Created #65 to track that.
In guv-web, there's an Install button, and against each app there's the option to Update refs - clicking that gives me a green success flash saying "Application updated", but the code base hasn't actually changed. Am I missing something, or is it not possible yet (in the UI)?