Skip to content

Commit 0722b51

Browse files
intel352claude
andauthored
chore: remove compiled UI assets, build at release time (#2)
* chore: remove compiled UI assets from git, build at release time Compiled UI assets should not be tracked in git. This change: - Adds .gitignore to exclude internal/ui_dist/* (keeping placeholder index.html) - Fixes Makefile ui target to output to internal/ui_dist/ (not repo root) - Updates release workflow to build UI from source before Go compilation - Removes stale ui_dist copy from install target (assets are embedded) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: use plain HTTPS clone since workflow repo is public No GH_TOKEN secret needed — GoCodeAlone/workflow is a public repo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cae9b7c commit 0722b51

4 files changed

Lines changed: 36 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: '22'
28+
29+
- name: Build admin UI
30+
run: |
31+
git clone --depth 1 https://github.com/GoCodeAlone/workflow.git /tmp/workflow-ui-build
32+
cd /tmp/workflow-ui-build/ui && npm ci && npx vite build
33+
rm -rf internal/ui_dist && cp -r /tmp/workflow-ui-build/ui/dist internal/ui_dist
34+
rm -rf /tmp/workflow-ui-build
35+
2536
- uses: actions/setup-go@v5
2637
with:
2738
go-version: '1.26'

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Compiled UI assets (built via 'make ui' or CI)
2+
internal/ui_dist/*
3+
!internal/ui_dist/index.html
4+
5+
# Build output
6+
bin/
7+
dist/
8+
9+
# Go
10+
*.exe
11+
*.exe~
12+
*.dll
13+
*.so
14+
*.dylib
15+
16+
# Node (UI build artifacts)
17+
node_modules/
18+
19+
# OS
20+
.DS_Store

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ install: build
1313
mkdir -p $(DESTDIR)/$(INSTALL_DIR)
1414
cp bin/$(BINARY_NAME) $(DESTDIR)/$(INSTALL_DIR)/
1515
cp plugin.json $(DESTDIR)/$(INSTALL_DIR)/
16-
cp -r ui_dist $(DESTDIR)/$(INSTALL_DIR)/
1716

1817
clean:
1918
rm -rf bin/
@@ -22,5 +21,5 @@ ui:
2221
@echo "Building admin UI from workflow repo..."
2322
cd /tmp && rm -rf workflow-ui-build && git clone --depth 1 git@github.com:GoCodeAlone/workflow.git workflow-ui-build
2423
cd /tmp/workflow-ui-build/ui && npm ci && npx vite build
25-
rm -rf ui_dist && cp -r /tmp/workflow-ui-build/ui/dist ui_dist
24+
rm -rf internal/ui_dist && cp -r /tmp/workflow-ui-build/ui/dist internal/ui_dist
2625
rm -rf /tmp/workflow-ui-build

internal/ui_dist/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<!-- Placeholder: replace with built admin UI assets -->
2-
<html><body>Admin UI not built. Run 'make ui' to build.</body></html>
1+
<!DOCTYPE html>
2+
<html>
3+
<body>Run 'make ui' to build admin UI</body>
4+
</html>

0 commit comments

Comments
 (0)