reproducible build

This commit is contained in:
Pierre Dubouilh 2021-11-12 22:49:35 +01:00 committed by Pierre Dubouilh
parent 16b31a5047
commit 177edf4791
4 changed files with 23 additions and 15 deletions

View file

@ -18,5 +18,5 @@ jobs:
submodules: true submodules: true
- name: Run - name: Run
run: make test run: make ci

2
.gitignore vendored
View file

@ -4,7 +4,7 @@ gossa-linux-arm
gossa-linux-arm64 gossa-linux-arm64
gossa-mac gossa-mac
gossa-windows.exe gossa-windows.exe
build-all builds
gossa.test gossa.test
*.out *.out

View file

@ -1,4 +1,4 @@
FLAGS := -ldflags "-s -w" FLAGS := -ldflags "-s -w" -trimpath
NOCGO := CGO_ENABLED=0 NOCGO := CGO_ENABLED=0
build: build:
@ -17,7 +17,10 @@ run-ro:
run-extra: run-extra:
./gossa -verb=true -prefix="/fancy-path/" -k=false -symlinks=true test-fixture ./gossa -verb=true -prefix="/fancy-path/" -k=false -symlinks=true test-fixture
test: ci: build-all test
echo "done"
test:
-@cd test-fixture && ln -s ../support .; true -@cd test-fixture && ln -s ../support .; true
go test -cover -c -tags testrunmain go test -cover -c -tags testrunmain
@ -52,13 +55,14 @@ watch-ro:
watch-test: watch-test:
ls gossa.go gossa_test.go gossa-ui/* | entr -rc make test ls gossa.go gossa_test.go gossa-ui/* | entr -rc make test
build-all: build-all: build
${NOCGO} GOOS=linux GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-linux-x64 ${NOCGO} GOOS=linux GOARCH=amd64 go build ${FLAGS} -o builds/gossa-linux-x64
${NOCGO} GOOS=linux GOARCH=arm go build ${FLAGS} -o build-all/gossa-linux-arm ${NOCGO} GOOS=linux GOARCH=arm go build ${FLAGS} -o builds/gossa-linux-arm
${NOCGO} GOOS=linux GOARCH=arm64 go build ${FLAGS} -o build-all/gossa-linux-arm64 ${NOCGO} GOOS=linux GOARCH=arm64 go build ${FLAGS} -o builds/gossa-linux-arm64
${NOCGO} GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-mac-x64 ${NOCGO} GOOS=darwin GOARCH=amd64 go build ${FLAGS} -o builds/gossa-mac-x64
${NOCGO} GOOS=darwin GOARCH=arm64 go build ${FLAGS} -o build-all/gossa-mac-arm64 ${NOCGO} GOOS=darwin GOARCH=arm64 go build ${FLAGS} -o builds/gossa-mac-arm64
${NOCGO} GOOS=windows GOARCH=amd64 go build ${FLAGS} -o build-all/gossa-windows.exe ${NOCGO} GOOS=windows GOARCH=amd64 go build ${FLAGS} -o builds/gossa-windows.exe
sha256sum builds/*
clean: clean:
-rm gossa -rm gossa

View file

@ -14,21 +14,25 @@ a [simple UI](https://github.com/pldubouilh/gossa-ui) comes as default, featurin
* 🔍 files/directories browser & handler * 🔍 files/directories browser & handler
* 📩 drag-and-drop uploader * 📩 drag-and-drop uploader
* 🚀 lightweight and dependency free * 🥂 fast golang static server
* 💾 90s web UI that prints in ms * 💾 90s web UI that prints in ms
* 📸 picture browser * 📸 picture browser
* 📽️ video streaming * 📽️ video streaming
* ✍️ simple text editor * ✍️ simple text/note editor
* ⌨️ keyboard navigation * ⌨️ keyboard navigation
* 🥂 fast golang static server * 🚀 lightweight codebase and dependency free
* 🔒 easy/secure multi account setup, read-only mode * 🔒 >95% test coverage and reproducible builds
* 💑 easy/secure multi account setup, read-only mode
* ✨ PWA enabled * ✨ PWA enabled
### build ### build
built blobs are available on the [release page](https://github.com/pldubouilh/gossa/releases) - or simply `make build` this repo. built blobs are available on the [release page](https://github.com/pldubouilh/gossa/releases) - or simply `make build` this repo.
all builds are reproducible, checkout the hashes on the release page.
arch linux users can also install through the [user repos](https://aur.archlinux.org/packages/gossa/) - e.g. `yay -S gossa` arch linux users can also install through the [user repos](https://aur.archlinux.org/packages/gossa/) - e.g. `yay -S gossa`
automatic boot-time startup can be handled with a user systemd service - see [support](https://github.com/pldubouilh/gossa/tree/master/support)
### usage ### usage
```sh ```sh
% ./gossa --help % ./gossa --help