Skip to content

Commit

Permalink
Move things around
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskuehl committed Sep 2, 2024
1 parent 0da9737 commit 27bbd71
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 39 deletions.
35 changes: 35 additions & 0 deletions .goreleaser-cli.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2
snapshot:
name_template: '{{.Env.VERSION}}'
builds:
- id: fput
main: ./cmd/fput
no_unique_dist_dir: true
binary: fput-{{.Os}}-{{.Arch}}
- id: fpb
main: ./cmd/fpb
no_unique_dist_dir: true
binary: fpb-{{.Os}}-{{.Arch}}
archives:
- format: binary
nfpms:
- id: cli
package_name: fluffy
builds:
- fpb
- fput
homepage: 'https://github.com/chriskuehl/fluffy'
maintainer: 'Chris Kuehl <[email protected]>'
description: 'command-line tools for uploading to fluffy servers'
license: Apache-2.0
formats:
- deb
- rpm
- archlinux
contents:
- src: /usr/bin/fpb-{{.Os}}-{{.Arch}}
dst: /usr/bin/fpb
type: symlink
- src: /usr/bin/fput-{{.Os}}-{{.Arch}}
dst: /usr/bin/fput
type: symlink
31 changes: 3 additions & 28 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,9 @@ version: 2
snapshot:
name_template: '{{.Env.VERSION}}'
builds:
- id: fput
main: ./cli/fput
- id: server
main: ./cmd/server
no_unique_dist_dir: true
binary: fput-{{.Os}}-{{.Arch}}
- id: fpb
main: ./cli/fpb
no_unique_dist_dir: true
binary: fpb-{{.Os}}-{{.Arch}}
binary: server-{{.Os}}-{{.Arch}}
archives:
- format: binary
nfpms:
- id: cli
package_name: fluffy
builds:
- fpb
- fput
homepage: 'https://github.com/chriskuehl/fluffy'
maintainer: 'Chris Kuehl <[email protected]>'
description: 'command-line tools for uploading to fluffy servers'
license: Apache-2.0
formats:
- deb
- rpm
- archlinux
contents:
- src: /usr/bin/fpb-{{.Os}}-{{.Arch}}
dst: /usr/bin/fpb
type: symlink
- src: /usr/bin/fput-{{.Os}}-{{.Arch}}
dst: /usr/bin/fput
type: symlink
25 changes: 16 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
.PHONY: minimal
minimal: bin/server bin/fpb bin/fput assets settings.py install-hooks

.PHONY: fluffy-server
.PHONY: bin/server
bin/server:
go build -o $@ ./cmd/server

.PHONY: bin/fpb
bin/fpb:
go build -o $@ ./cmd/fpb

.PHONY: bin/fput
bin/fput:
go build -o $@ ./cmd/fput

.PHONY: dev
dev:
go run github.com/cespare/reflex@latest -v -s -r '^server/|^go\.mod$$' -- go run ./cmd/server --dev
Expand All @@ -13,18 +21,17 @@ dev:
delve:
dlv debug ./cmd/server -- --dev

.PHONY: bin/fpb
bin/fpb:
go build -o $@ ./cli/fpb

.PHONY: bin/fput
bin/fput:
go build -o $@ ./cli/fput

.PHONY: release-cli
release-cli: export GORELEASER_CURRENT_TAG ?= 0.0.0
release-cli: export VERSION ?= 0.0.0
release-cli:
go run github.com/goreleaser/goreleaser/v2@latest release --config .goreleaser-cli.yaml --clean --snapshot --verbose
rm -v dist/*.txt dist/*.yaml dist/*.json

.PHONY: release-server
release-server: export GORELEASER_CURRENT_TAG ?= 0.0.0
release-server: export VERSION ?= 0.0.0
release-server:
go run github.com/goreleaser/goreleaser/v2@latest release --clean --snapshot --verbose
rm -v dist/*.txt dist/*.yaml dist/*.json

Expand Down
2 changes: 1 addition & 1 deletion cli/fpb/fpb.go → cmd/fpb/fpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/spf13/cobra"

"github.com/chriskuehl/fluffy/cli/internal/cli"
"github.com/chriskuehl/fluffy/cmd/internal/cli"
)

// This will be set by the linker for release builds.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cli/fput/fput.go → cmd/fput/fput.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/spf13/cobra"

"github.com/chriskuehl/fluffy/cli/internal/cli"
"github.com/chriskuehl/fluffy/cmd/internal/cli"
)

// This will be set by the linker for release builds.
Expand Down
File renamed without changes.

0 comments on commit 27bbd71

Please sign in to comment.