Skip to content

Commit

Permalink
Put the script and unit file artifacts in a different dir (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
UnstoppableMango authored Jul 31, 2024
1 parent 3649cba commit 1e3dc7b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
args: -p 3 release
version: '~> v2'
args: release

- name: Upload binaries
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ yarn.lock
ci-scripts
.work/
dist/
out/

provider/**/schema-embed.json

Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: 2

before:
hooks:
- make dist/baremetal-provisioner.service
- make dist/install.sh
- make out/baremetal-provisioner.service
- make out/install.sh

builds:
- id: resource
Expand Down Expand Up @@ -50,8 +50,8 @@ release:
prerelease: auto
extra_files:
- glob: dist/provisioner-*
- glob: dist/install.sh
- glob: dist/baremetal-provisioner.service
- glob: out/install.sh
- glob: out/baremetal-provisioner.service

snapshot:
name_template: '{{ .Tag }}-SNAPSHOT'
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ensure::
cd tests && go mod tidy

remake::
rm -rf bin .make .test hack/.work dist/
rm -rf bin dist out .make .test hack/.work

provider:: bin/$(PROVIDER)

Expand Down Expand Up @@ -179,10 +179,10 @@ install_nodejs_sdk::
yarn link --cwd $(WORKING_DIR)/sdk/nodejs/bin

# ------- Real Targets -------
dist/install.sh: $(PROVIDER_PATH)/cmd/provisioner/install.sh
out/install.sh: $(PROVIDER_PATH)/cmd/provisioner/install.sh
mkdir -p '${@D}' && cp '$<' '$@'

dist/baremetal-provisioner.service: $(PROVIDER_PATH)/cmd/provisioner/baremetal-provisioner.service
out/baremetal-provisioner.service: $(PROVIDER_PATH)/cmd/provisioner/baremetal-provisioner.service
mkdir -p '${@D}' && cp '$<' '$@'

bin/$(PROVIDER):: $(GEN_SRC) $(MAN_SRC) $(PKG_SRC) provider/*go*
Expand Down Expand Up @@ -222,7 +222,7 @@ buf.lock: $(BUF_CONFIG)
cd tests/sdk/$* && go test -v -count=1 -cover -timeout 2h ./...
@touch $@

.test/install_script: dist/install.sh
.test/install_script: out/install.sh
DEV_MODE=true INSTALL_DIR=${WORKING_DIR}/bin $<
@touch $@

Expand Down

0 comments on commit 1e3dc7b

Please sign in to comment.