mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+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>
This commit is contained in:
parent
f2341a3477
commit
c7c4379e4d
1 changed files with 45 additions and 0 deletions
45
projects/github.com/jesseduffield/horcrux/package.yml
Normal file
45
projects/github.com/jesseduffield/horcrux/package.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
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
|
Loading…
Reference in a new issue