Skip to content

Commit c3c4091

Browse files
authored
Merge pull request #833 from dgageot/build-and-link
Works better with git worktrees
2 parents beabebd + d259a34 commit c3c4091

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ jobs:
8989
with:
9090
version: 3.x
9191

92+
- name: Create bin directory
93+
run: mkdir -p $HOME/bin
94+
9295
- name: Build
9396
run: task build
9497

Taskfile.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tasks:
2323
desc: Build the application binary
2424
cmds:
2525
- go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.MAIN_PKG}}
26+
- ln -sf {{.USER_WORKING_DIR}}/{{.BUILD_DIR}}/{{.BINARY_NAME}} {{.HOME}}/bin/{{.BINARY_NAME}}
2627
sources:
2728
- "{{.GO_SOURCES}}"
2829
- "**/*.template"
@@ -32,10 +33,6 @@ tasks:
3233
generates:
3334
- "{{.BUILD_DIR}}/{{.BINARY_NAME}}"
3435

35-
link:
36-
desc: Creates a symlink to ~/bin
37-
cmd: ln -sf {{.USER_WORKING_DIR}}/{{.BUILD_DIR}}/{{.BINARY_NAME}} {{.HOME}}/bin/{{.BINARY_NAME}}
38-
3936
lint:
4037
desc: Run golangci-lint
4138
cmd: golangci-lint run

0 commit comments

Comments
 (0)