detached 51e7b4d

build(makefile): make gui build default and reorganize targets

commit
51e7b4d615e34b9b7200b4e2ac95477a321e8762
author
bamen · · 2025-09-09 18:23 UTC
committer
bamen · · 2025-09-09 19:09 UTC
parent
bab08aa
signature
unsigned
1 file · +12 -11
M Makefile +12 -11
@@ -1,6 +1,6 @@
11 # Makefile for dumber
22
3-.PHONY: build build-frontend test lint clean install-tools dev generate help check init build-static
3+.PHONY: build build-frontend test lint clean install-tools dev generate help check init build-static build-no-gui
44
55 # Load local overrides from .env.local if present (Makefile syntax)
66 ifneq (,$(wildcard .env.local))
@@ -33,27 +33,28 @@ help: ## Show this help message
3333 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
3434
3535 # Build targets
36-build: build-frontend ## Build the application (frontend assets, then Go binary)
37- @echo "Building $(BINARY_NAME) $(VERSION)..."
36+build: build-frontend ## Build the application with GUI (frontend assets, then Go binary with WebKitGTK)
37+ @echo "Building $(BINARY_NAME) $(VERSION) with GUI..."
3838 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
39- $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)
39+ $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)
4040
4141 build-frontend: ## Build TypeScript frontend
4242 @echo "Building TypeScript frontend..."
4343 @cd frontend && npm install --silent && npm run build
4444 @echo "Frontend build complete"
4545
46-build-static: ## Build static binary (CGO disabled, CLI-only functionality)
47- @echo "Building static $(BINARY_NAME) $(VERSION) (CLI-only)..."
46+build-no-gui: build-frontend ## Build binary without GUI (CGO disabled, CLI-only functionality)
47+ @echo "Building $(BINARY_NAME) $(VERSION) (CLI-only, no GUI)..."
4848 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
49- $(GOENV) CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME)-static $(MAIN_PATH)
49+ $(GOENV) CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME)-no-gui $(MAIN_PATH)
50+
51+build-static: build-no-gui ## Alias for build-no-gui (backward compatibility)
52+ @echo "Note: build-static is deprecated, use build-no-gui instead"
5053
5154 # GUI build with WebKitGTK 6.0 (GTK4)
5255 .PHONY: build-gui run-gui
53-build-gui: build-frontend ## Build GUI binary with native WebKitGTK 6.0 (requires GTK4/WebKitGTK 6 dev packages)
54- @echo "Building $(BINARY_NAME) (GUI, webkit_cgo)…"
55- @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
56- $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)
56+build-gui: build ## Alias for default build (backward compatibility)
57+ @echo "Note: build-gui is now the default 'build' target"
5758
5859 run-gui: ## Run the GUI with native WebKitGTK 6.0 (requires GTK4/WebKitGTK 6 dev packages)
5960 @echo "Running GUI (webkit_cgo)…"
@@ -1,6 +1,6 @@
1 # Makefile for dumber1 # Makefile for dumber
2 2
3-.PHONY: build build-frontend test lint clean install-tools dev generate help check init build-static3+.PHONY: build build-frontend test lint clean install-tools dev generate help check init build-static build-no-gui
4 4
5 # Load local overrides from .env.local if present (Makefile syntax)5 # Load local overrides from .env.local if present (Makefile syntax)
6 ifneq (,$(wildcard .env.local))6 ifneq (,$(wildcard .env.local))
@@ -33,27 +33,28 @@ help: ## Show this help message
33 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)33 @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
34 34
35 # Build targets35 # Build targets
36-build: build-frontend ## Build the application (frontend assets, then Go binary)36+build: build-frontend ## Build the application with GUI (frontend assets, then Go binary with WebKitGTK)
37- @echo "Building $(BINARY_NAME) $(VERSION)..."37+ @echo "Building $(BINARY_NAME) $(VERSION) with GUI..."
38 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod38 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
39- $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)39+ $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)
40 40
41 build-frontend: ## Build TypeScript frontend41 build-frontend: ## Build TypeScript frontend
42 @echo "Building TypeScript frontend..."42 @echo "Building TypeScript frontend..."
43 @cd frontend && npm install --silent && npm run build43 @cd frontend && npm install --silent && npm run build
44 @echo "Frontend build complete"44 @echo "Frontend build complete"
45 45
46-build-static: ## Build static binary (CGO disabled, CLI-only functionality)46+build-no-gui: build-frontend ## Build binary without GUI (CGO disabled, CLI-only functionality)
47- @echo "Building static $(BINARY_NAME) $(VERSION) (CLI-only)..."47+ @echo "Building $(BINARY_NAME) $(VERSION) (CLI-only, no GUI)..."
48 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod48 @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
49- $(GOENV) CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME)-static $(MAIN_PATH)49+ $(GOENV) CGO_ENABLED=0 go build $(LDFLAGS) -o $(DIST_DIR)/$(BINARY_NAME)-no-gui $(MAIN_PATH)
50+
51+build-static: build-no-gui ## Alias for build-no-gui (backward compatibility)
52+ @echo "Note: build-static is deprecated, use build-no-gui instead"
50 53
51 # GUI build with WebKitGTK 6.0 (GTK4)54 # GUI build with WebKitGTK 6.0 (GTK4)
52 .PHONY: build-gui run-gui55 .PHONY: build-gui run-gui
53-build-gui: build-frontend ## Build GUI binary with native WebKitGTK 6.0 (requires GTK4/WebKitGTK 6 dev packages)56+build-gui: build ## Alias for default build (backward compatibility)
54- @echo "Building $(BINARY_NAME) (GUI, webkit_cgo)…"57+ @echo "Note: build-gui is now the default 'build' target"
55- @mkdir -p $(DIST_DIR) tmp tmp/go-cache tmp/go-mod
56- $(GOENV) CGO_ENABLED=1 go build $(LDFLAGS) -tags=webkit_cgo -o $(DIST_DIR)/$(BINARY_NAME) $(MAIN_PATH)
57 58
58 run-gui: ## Run the GUI with native WebKitGTK 6.0 (requires GTK4/WebKitGTK 6 dev packages)59 run-gui: ## Run the GUI with native WebKitGTK 6.0 (requires GTK4/WebKitGTK 6 dev packages)
59 @echo "Running GUI (webkit_cgo)…"60 @echo "Running GUI (webkit_cgo)…"

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close