aboutsummaryrefslogtreecommitdiff
path: root/internal/lume/lume.go
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-06-21 13:56:51 -0400
committerXe Iaso <me@xeiaso.net>2024-06-21 13:56:51 -0400
commitb2d9350d4373488405f46f5a3d23d041cd88bbab (patch)
tree9a73cd8123177cf6dae13b09f2a2a49035ab51e4 /internal/lume/lume.go
parentade22021415a543b64ffab3a90f9be356f5afb04 (diff)
downloadxesite-b2d9350d4373488405f46f5a3d23d041cd88bbab.tar.xz
xesite-b2d9350d4373488405f46f5a3d23d041cd88bbab.zip
Earthfile: launch /app/xesite for branding clout
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'internal/lume/lume.go')
-rw-r--r--internal/lume/lume.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/lume/lume.go b/internal/lume/lume.go
index 64a32c8..39516d9 100644
--- a/internal/lume/lume.go
+++ b/internal/lume/lume.go
@@ -193,6 +193,13 @@ func New(ctx context.Context, o *Options) (*FS, error) {
return nil, fmt.Errorf("lume: can't pull: %w", err)
}
+ head, err := repo.Head()
+ if err != nil {
+ return nil, fmt.Errorf("lume: can't get head: %w", err)
+ }
+
+ slog.Debug("branch head", "hash", head.Hash().String(), "branchName", head.Name().Short())
+
err = wt.Checkout(&git.CheckoutOptions{
Branch: plumbing.NewBranchReferenceName(o.Branch),
})