Skip to content

Commit 4c35b81

Browse files
authored
fix: Prefix paths in find on macOS (#1284)
This fixes paths not resolving in macOS, causing the build target to fail. This also renames the site target to specify the index.html, which is the output artifact of building the site.
1 parent e860cc4 commit 4c35b81

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/coder.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ jobs:
355355
js-${{ runner.os }}-
356356
357357
- name: Build site
358-
run: make site/out
358+
run: make site/out/index.html
359359

360360
- name: Build Release
361361
uses: goreleaser/goreleaser-action@v2.9.1
@@ -488,7 +488,7 @@ jobs:
488488

489489
- name: Build
490490
run: |
491-
make site/out
491+
make site/out/index.html
492492
493493
- run: yarn playwright:install
494494
working-directory: site

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: brew install make
5959

6060
- name: Build Site
61-
run: make site/out
61+
run: make site/out/index.html
6262

6363
- name: Run GoReleaser
6464
uses: goreleaser/goreleaser-action@v2.9.1

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ INSTALL_DIR=$(shell go env GOPATH)/bin
44
GOOS=$(shell go env GOOS)
55
GOARCH=$(shell go env GOARCH)
66

7-
bin: $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
7+
bin: $(shell find . -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
88
@echo "== This builds binaries for command-line usage."
99
@echo "== Use \"make build\" to embed the site."
1010
goreleaser build --snapshot --rm-dist --single-target
@@ -20,7 +20,7 @@ coderd/database/dump.sql: $(wildcard coderd/database/migrations/*.sql)
2020
coderd/database/querier.go: coderd/database/dump.sql $(wildcard coderd/database/queries/*.sql)
2121
coderd/database/generate.sh
2222

23-
dist/artifacts.json: site/out $(shell find -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
23+
dist/artifacts.json: site/out/index.html $(shell find . -not -path './vendor/*' -type f -name '*.go') go.mod go.sum
2424
goreleaser release --snapshot --rm-dist --skip-sign
2525

2626
fmt/prettier:
@@ -76,7 +76,7 @@ provisionersdk/proto/provisioner.pb.go: provisionersdk/proto/provisioner.proto
7676
--go-drpc_opt=paths=source_relative \
7777
./provisionersdk/proto/provisioner.proto
7878

79-
site/out: $(shell find ./site -not -path './site/node_modules/*' -type f -name '*.tsx') $(shell find ./site -not -path './site/node_modules/*' -type f -name '*.ts') site/package.json
79+
site/out/index.html: $(shell find ./site -not -path './site/node_modules/*' -type f -name '*.tsx') $(shell find ./site -not -path './site/node_modules/*' -type f -name '*.ts') site/package.json
8080
./scripts/yarn_install.sh
8181
cd site && yarn typegen
8282
cd site && yarn build

0 commit comments

Comments
 (0)