Skip to content

Commit 58e0508

Browse files
authored
Merge pull request #465 from Unpackerr/dn2_embed
switch to embed from bindata
2 parents 9401987 + aba6f8a commit 58e0508

File tree

14 files changed

+41
-356
lines changed

14 files changed

+41
-356
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ run:
2323
timeout: 3m
2424

2525
linters-settings:
26-
ireturn:
27-
allow: generic,stdlib,error
2826
depguard:
2927
rules:
3028
main:

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ clean:
7575
rm -f unpackerr unpackerr.*.{macos,freebsd,linux,exe}{,.gz,.zip} unpackerr.1{,.gz} unpackerr.rb
7676
rm -f unpackerr{_,-}*.{deb,rpm,txz} v*.tar.gz.sha256 examples/MANUAL .metadata.make rsrc_*.syso
7777
rm -f cmd/unpackerr/README{,.html} README{,.html} ./unpackerr_manual.html rsrc.syso Unpackerr.*.app.zip
78-
rm -f PKGBUILD pkg/bindata/bindata.go
78+
rm -f PKGBUILD
7979
rm -rf package_build_* release Unpackerr.*.app Unpackerr.app
8080

8181
####################
@@ -94,12 +94,12 @@ unpackerr.1.gz:
9494

9595
# TODO: provide a template that adds the date to the built html file.
9696
readme: README.html
97-
README.html:
97+
README.html:
9898
# This turns README.md into README.html
9999
go run github.com/davidnewhall/[email protected] --manual unpackerr --version $(VERSION) --date "$(DATE)" README.md
100100

101101
rsrc: rsrc.syso
102-
rsrc.syso: init/windows/application.ico init/windows/manifest.xml
102+
rsrc.syso: init/windows/application.ico init/windows/manifest.xml
103103
go run github.com/akavel/rsrc@latest -arch amd64 -ico init/windows/application.ico -manifest init/windows/manifest.xml
104104

105105
####################
@@ -337,8 +337,8 @@ lint: generate
337337
GOOS=freebsd golangci-lint run
338338
GOOS=windows golangci-lint run
339339

340-
generate: pkg/bindata/bindata.go
341-
pkg/bindata/bindata.go: pkg/bindata/files/*
340+
generate: examples/unpackerr.conf.example
341+
examples/unpackerr.conf.example: init/config/*
342342
find pkg -name .DS\* -delete
343343
go generate ./...
344344

examples/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ services:
135135
- UN_CMDHOOK_0_EXCLUDE_1=lidarr
136136
- UN_CMDHOOK_0_TIMEOUT=10s
137137

138-
## => Content Auto Generated, 17 JUL 2024 08:35 UTC
138+
## => Content Auto Generated, 17 JUL 2024 16:48 UTC

examples/examples.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package examples
2+
3+
// This file allows unpackerr to import the example config file into the binary.
4+
5+
import _ "embed"
6+
7+
var (
8+
//go:embed unpackerr.conf.example
9+
ConfigFile []byte
10+
//go:embed docker-compose.yml
11+
DockerCompose []byte
12+
//go:embed MANUAL.md
13+
ManualMakrdown []byte
14+
)

examples/unpackerr.conf.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,4 +301,4 @@ dir_mode = "0755"
301301
## You can adjust how long to wait for the command to run.
302302
# timeout = "10s"
303303

304-
## => Content Auto Generated, 17 JUL 2024 08:35 UTC
304+
## => Content Auto Generated, 17 JUL 2024 16:48 UTC

pkg/bindata/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
The files in this folder are auto generated from the files/ folder.
2-
Currently bindata is used to store the app GUI icon files.
1+
The files in this folder are bundled into the compiled application binary.

pkg/bindata/bindata.go

Lines changed: 0 additions & 329 deletions
This file was deleted.

pkg/bindata/bindata_other.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//go:build !windows
2+
3+
package bindata
4+
5+
import _ "embed"
6+
7+
//go:embed macos.png
8+
var SystrayIcon []byte

pkg/bindata/bindata_windows.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//go:build windows
2+
3+
package bindata
4+
5+
import _ "embed"
6+
7+
//go:embed windows.ico
8+
var SystrayIcon []byte

pkg/bindata/generate.go

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)