2.0.1 dcf7d6b

Makefile RawHistoryFolder

1# This Makefile is used for dev purposes
2# Variables
3REPO := ghcr.io/bnema/gordon
4TAG := v2-dev
5DIST_DIR := ./dist
6ENGINE := podman
7
8# Version information
9VERSION := $(shell git describe --tags --always --dirty)
10COMMIT := $(shell git rev-parse --short HEAD)
11BUILD_DATE := $(shell date -u '+%Y-%m-%d_%I:%M:%S%p')
12
13# Build flags
14LDFLAGS := -s -w \
15	-X main.version=$(VERSION) \
16	-X main.commit=$(COMMIT) \
17	-X main.date=$(BUILD_DATE)
18
19# Architectures
20ARCHS := amd64 arm64
21
22# Phony targets
23.PHONY: all build build-push clean
24
25# Default target
26all: build
27
28# Build binaries
29build:
30	@echo "Building Go binaries..."
31	@mkdir -p $(DIST_DIR)
32	@rm -f $(DIST_DIR)/*
33	@echo "Building with version $(VERSION), commit $(COMMIT), date $(BUILD_DATE)"
34	@CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$(LDFLAGS)" -o $(DIST_DIR)/gordon-linux-amd64 ./main.go
35	@CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="$(LDFLAGS)" -o $(DIST_DIR)/gordon-linux-arm64 ./main.go
36	@echo "Go binaries built successfully"
37
38# Build and push Docker images
39build-push: build
40	@echo "Cleaning up dangling images..."
41	@$(ENGINE) image prune -f
42
43	@echo "Building and pushing Docker images..."
44	@for arch in $(ARCHS); do \
45		cp $(DIST_DIR)/gordon-linux-$$arch gordon; \
46		$(ENGINE) build -t $(REPO):$(TAG)-$$arch .; \
47		rm gordon; \
48		$(ENGINE) push $(REPO):$(TAG)-$$arch; \
49	done
50
51	@echo "Removing existing manifest..."
52	@$(ENGINE) manifest rm $(REPO):$(TAG) || true
53
54	@echo "Creating multi-arch manifest..."
55	@$(ENGINE) manifest create $(REPO):$(TAG) \
56		$(REPO):$(TAG)-amd64 \
57		$(REPO):$(TAG)-arm64
58
59	@echo "Annotating arm64 image..."
60	@$(ENGINE) manifest annotate $(REPO):$(TAG) \
61		$(REPO):$(TAG)-arm64 --arch arm64 --variant v8
62
63	@echo "Inspecting manifest..."
64	@$(ENGINE) manifest inspect $(REPO):$(TAG)
65
66	@echo "Pushing multi-arch manifest..."
67	@$(ENGINE) manifest push --all $(REPO):$(TAG)
68
69	@echo "Script completed successfully."
70
71# Clean up
72clean:
73	@echo "Cleaning up..."
74	@rm -rf $(DIST_DIR)
75	@$(ENGINE) system prune -f
76	@echo "Cleanup completed."

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 7

Tags 106

↑↓ moveenter openesc close