Merge pull request #62 from ooni/feature/release
Publish code used to generate v3.0.0-beta.4
This commit is contained in:
commit
1d8becf50f
|
@ -1,33 +0,0 @@
|
||||||
project_name: ooniprobe
|
|
||||||
release:
|
|
||||||
github:
|
|
||||||
owner: ooni
|
|
||||||
name: probe-cli
|
|
||||||
brew:
|
|
||||||
install: bin.install "ooniprobe"
|
|
||||||
builds:
|
|
||||||
- goos:
|
|
||||||
- darwin
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
main: cmd/ooni/main.go
|
|
||||||
binary: ooni
|
|
||||||
- goos:
|
|
||||||
- windows
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
env:
|
|
||||||
- CC=x86_64-w64-mingw32-gcc
|
|
||||||
- CXX=x86_64-w64-mingw32-g++
|
|
||||||
- CGO_ENABLED=1
|
|
||||||
main: cmd/ooni/main.go
|
|
||||||
binary: ooni
|
|
||||||
archive:
|
|
||||||
format: tar.gz
|
|
||||||
name_template: '{{ .Binary }}_{{.Version}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{
|
|
||||||
.Arm }}{{ end }}'
|
|
||||||
files:
|
|
||||||
- LICENSE.*
|
|
||||||
- Readme.*
|
|
||||||
snapshot:
|
|
||||||
name_template: SNAPSHOT-{{ .Commit }}
|
|
46
Makefile
46
Makefile
|
@ -1,46 +0,0 @@
|
||||||
GO ?= GOPATH="" go
|
|
||||||
|
|
||||||
install-dev-deps:
|
|
||||||
@$(GO) get golang.org/x/tools/cmd/cover
|
|
||||||
@$(GO) get github.com/mattn/goveralls
|
|
||||||
|
|
||||||
build:
|
|
||||||
@echo "Building dist/ooni"
|
|
||||||
@$(GO) build -o dist/ooni cmd/ooni/main.go
|
|
||||||
.PHONY: build
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
@echo "Building dist/windows/amd64/ooni.exe"
|
|
||||||
@./build.sh windows
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
@echo "Building dist/linux/amd64/ooni"
|
|
||||||
@./build.sh linux
|
|
||||||
|
|
||||||
build-macos:
|
|
||||||
@echo "Building dist/macos/amd64/ooni"
|
|
||||||
@./build.sh macos
|
|
||||||
|
|
||||||
build-all: build-windows build-linux build-macos
|
|
||||||
.PHONY: build-all build-windows build-linux build-macos
|
|
||||||
|
|
||||||
bindata:
|
|
||||||
@$(GO) run vendor/github.com/shuLhan/go-bindata/go-bindata/*.go \
|
|
||||||
-nometadata \
|
|
||||||
-o internal/bindata/bindata.go -pkg bindata \
|
|
||||||
data/...;
|
|
||||||
|
|
||||||
release:
|
|
||||||
GITHUB_TOKEN=`cat ~/.GORELEASE_GITHUB_TOKEN` goreleaser --rm-dist
|
|
||||||
./build.sh linux
|
|
||||||
mv dist/linux/amd64 dist/ooniprobe_$(git describe --tags | sed s/^v//)_linux_amd64
|
|
||||||
tar cvzf dist/ooniprobe_$(git describe --tags | sed s/^v//)_linux_amd64.tar.gz \
|
|
||||||
-C dist/ooniprobe_$(git describe --tags | sed s/^v//)_linux_amd64 \
|
|
||||||
ooni
|
|
||||||
cd dist && shasum -a 256 ooniprobe_$(git describe --tags | sed s/^v//)_linux_amd64.tar.gz >> ooniprobe_checksums.txt
|
|
||||||
gpg -a --detach-sign dist/ooniprobe_checksums.txt
|
|
||||||
|
|
||||||
test-internal:
|
|
||||||
@$(GO) test -v ./internal/...
|
|
||||||
|
|
||||||
.PHONY: bindata
|
|
19
build.sh
19
build.sh
|
@ -2,7 +2,6 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$GOPATH" != "" ]; then
|
if [ "$GOPATH" != "" ]; then
|
||||||
echo "$0: WARNING: unsetting GOPATH as we don't need it" 1>&2
|
|
||||||
unset GOPATH
|
unset GOPATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -24,6 +23,18 @@ elif [ "$1" = "macos" ]; then
|
||||||
set -x
|
set -x
|
||||||
go build -o dist/macos/amd64/ooniprobe -v ./cmd/ooniprobe
|
go build -o dist/macos/amd64/ooniprobe -v ./cmd/ooniprobe
|
||||||
|
|
||||||
|
elif [ "$1" = "release" ]; then
|
||||||
|
set -x
|
||||||
|
v=`git describe --tags`
|
||||||
|
$0 linux
|
||||||
|
tar -czf ooniprobe-linux-amd64-$v.tar.gz ./dist/linux/amd64
|
||||||
|
$0 macos
|
||||||
|
tar -czf ooniprobe-macos-amd64-$v.tar.gz ./dist/macos/amd64
|
||||||
|
$0 windows
|
||||||
|
tar -czf ooniprobe-windows-amd64-$v.tar.gz ./dist/windows/amd64
|
||||||
|
echo ""
|
||||||
|
echo "Now sign the packages and upload them to GitHub"
|
||||||
|
|
||||||
elif [ "$1" = "_travis-linux" ]; then
|
elif [ "$1" = "_travis-linux" ]; then
|
||||||
set -x
|
set -x
|
||||||
$0 linux
|
$0 linux
|
||||||
|
@ -40,7 +51,7 @@ elif [ "$1" = "_travis-osx" ]; then
|
||||||
go test -v -coverprofile=ooni.cov ./...
|
go test -v -coverprofile=ooni.cov ./...
|
||||||
|
|
||||||
elif [ "$1" = "help" ]; then
|
elif [ "$1" = "help" ]; then
|
||||||
echo "Usage: $0 linux | macos | windows"
|
echo "Usage: $0 linux | macos | release | windows"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Builds OONI on supported systems. The output binary will"
|
echo "Builds OONI on supported systems. The output binary will"
|
||||||
echo "be saved at './dist/<system>/<arch>/ooniprobe[.exe]'."
|
echo "be saved at './dist/<system>/<arch>/ooniprobe[.exe]'."
|
||||||
|
@ -61,6 +72,10 @@ elif [ "$1" = "help" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "- brew upgrade"
|
echo "- brew upgrade"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "# Release"
|
||||||
|
echo ""
|
||||||
|
echo "Will build ooniprobe for all supported systems."
|
||||||
|
echo ""
|
||||||
echo "# Windows"
|
echo "# Windows"
|
||||||
echo ""
|
echo ""
|
||||||
echo "You must be on macOS. You must install Measurement Kit once using:"
|
echo "You must be on macOS. You must install Measurement Kit once using:"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user