pantry/projects/github.com/jesseduffield/horcrux/package.yml
Kevin Chen c7c4379e4d
+horcrux -- Split your file into encrypted fragments (#3328)
* +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>
2023-09-16 14:32:41 -04:00

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