mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
c7c4379e4d
* +horcrux -- Split your file into encrypted fragments so that you don't need to remember a passcode * test this should work, but doesn't on my machine. directory error. * fix logic bug in v0.3 --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
distributable:
|
|
url: https://github.com/jesseduffield/horcrux/archive/refs/tags/v{{version.raw}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: jesseduffield/horcrux/tags
|
|
strip: /^v/
|
|
|
|
provides:
|
|
- bin/horcrux
|
|
|
|
build:
|
|
dependencies:
|
|
go.dev: ^1.14
|
|
script:
|
|
- go mod download
|
|
# Bug in split.go that prevents it from splitting
|
|
- run: |
|
|
sed -i.bak 's/Split(path, path, total, threshold)/Split(path, filepath.Dir(path), total, threshold)/' split.go
|
|
rm split.go.bak
|
|
working-directory: pkg/commands
|
|
- go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC .
|
|
env:
|
|
GOPROXY: https://proxy.golang.org,direct
|
|
GOSUMDB: sum.golang.org
|
|
GO111MODULE: on
|
|
CGO_ENABLED: 0
|
|
BUILDLOC: '{{prefix}}/bin/horcrux'
|
|
LDFLAGS:
|
|
- -s
|
|
- -w
|
|
linux:
|
|
# or segmentation fault
|
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
|
LDFLAGS:
|
|
- -buildmode=pie
|
|
|
|
test:
|
|
fixture: packages by tea
|
|
script:
|
|
- cp $FIXTURE tea.txt
|
|
- horcrux -t 3 -n 5 split tea.txt
|
|
- rm tea.txt tea_1_of_5.horcrux tea_4_of_5.horcrux
|
|
- horcrux bind
|
|
- cmp tea.txt $FIXTURE
|