Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
95523d43
Commit
95523d43
authored
Jan 21, 2020
by
Janos Guljas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add goreleaser GitHub Action and Dockerfile
parent
61f0e7f7
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
189 additions
and
102 deletions
+189
-102
release.yaml
.github/workflows/release.yaml
+30
-0
.gitignore
.gitignore
+30
-0
.goreleaser.yml
.goreleaser.yml
+65
-0
Dockerfile
Dockerfile
+12
-0
Makefile
Makefile
+17
-1
go.mod
go.mod
+1
-20
go.sum
go.sum
+23
-79
version.go
version.go
+11
-2
No files found.
.github/workflows/release.yaml
0 → 100644
View file @
95523d43
name
:
Release
on
:
push
:
branches-ignore
:
-
'
**'
tags
:
-
'
v*.*.*'
jobs
:
goreleaser
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v1
-
name
:
Set up Go
uses
:
actions/setup-go@v1
with
:
go-version
:
1.x
-
name
:
Run GoReleaser
uses
:
goreleaser/goreleaser-action@v1
with
:
version
:
latest
args
:
release --rm-dist
key
:
${{ secrets.YOUR_PRIVATE_KEY }}
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
.gitignore
0 → 100644
View file @
95523d43
/dist
/.idea
/.vscode
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
.DS_Store
.goreleaser.yml
0 → 100644
View file @
95523d43
project_name
:
bee
builds
:
-
main
:
./cmd/bee/main.go
binary
:
bee
flags
:
-
-v
-
-trimpath
ldflags
:
-
-s -w -X github.com/janos/bee.version={{.Version}} -X github.com/janos/bee.commit={{.ShortCommit}}
env
:
-
CGO_ENABLED=0
goos
:
-
darwin
-
linux
-
windows
goarch
:
-
amd64
-
386
-
arm64
-
arm
ignore
:
-
goos
:
darwin
goarch
:
386
-
goos
:
darwin
goarch
:
arm64
-
goos
:
darwin
goarch
:
arm
-
goos
:
windows
goarch
:
arm64
-
goos
:
windows
goarch
:
arm
snapshot
:
name_template
:
"
{{.Tag}}-snapshot"
archives
:
-
name_template
:
"
{{
tolower
.ProjectName
}}-{{
tolower
.Os
}}-{{
tolower
.Arch
}}{{
if
.Arm
}}v{{
.Arm
}}{{
end
}}"
format
:
binary
nfpms
:
-
file_name_template
:
"
{{
tolower
.ProjectName
}}-{{
tolower
.Os
}}-{{
tolower
.Arch
}}{{
if
.Arm
}}v{{
.Arm
}}{{
end
}}"
vendor
:
Ethereum Swarm
homepage
:
https://swarm.ethereum.org/
maintainer
:
Janoš Guljaš <janos@ethswarm.org>
description
:
Ethereum Swarm node
license
:
GPL-3
formats
:
-
deb
-
rpm
bindir
:
/usr/bin
Dockerfile
0 → 100644
View file @
95523d43
FROM
golang AS builder
ADD
. /src
WORKDIR
/src
RUN
make binary
FROM
debian
RUN
apt update
&&
apt
install
-y
\
ca-certificates
\
&&
rm
-rf
/var/lib/apt/lists/
*
COPY
--from=builder /src/dist/bee bee
RUN
chmod
+x ./bee
ENTRYPOINT
["./bee"]
Makefile
View file @
95523d43
GO
?=
go
GO
?=
go
GOLANGCI_LINT
?=
golangci-lint
GOLANGCI_LINT
?=
golangci-lint
LDFLAGS
?=
-s
-w
-X
github.com/janos/bee.commit
=
"
$(
shell
git describe --long --dirty --always --match "" || true
)
"
.PHONY
:
all
all
:
lint vet test binary
.PHONY
:
binary
binary
:
export CGO_ENABLED=0
binary
:
dist FORCE
$(GO)
version
$(GO)
build
-trimpath
-ldflags
"
$(LDFLAGS)
"
-o
dist/bee ./cmd/bee
dist
:
mkdir
$@
.PHONY
:
lint
.PHONY
:
lint
lint
:
lint
:
$(GOLANGCI_LINT)
run
$(GOLANGCI_LINT)
run
...
@@ -16,4 +30,6 @@ test:
...
@@ -16,4 +30,6 @@ test:
.PHONY
:
build
.PHONY
:
build
build
:
export CGO_ENABLED=0
build
:
export CGO_ENABLED=0
build
:
build
:
$(GO)
build
-trimpath
-ldflags
"-s -w"
./...
$(GO)
build
-trimpath
-ldflags
"
$(LDFLAGS)
"
./...
FORCE
:
go.mod
View file @
95523d43
...
@@ -5,38 +5,19 @@ go 1.13
...
@@ -5,38 +5,19 @@ go 1.13
require (
require (
github.com/gogo/protobuf v1.3.1
github.com/gogo/protobuf v1.3.1
github.com/gorilla/handlers v1.4.2
github.com/gorilla/handlers v1.4.2
github.com/hashicorp/golang-lru v0.5.3 // indirect
github.com/ipfs/go-log v1.0.1 // indirect
github.com/ipfs/go-log v1.0.1 // indirect
github.com/libp2p/go-conn-security v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.5.0
github.com/libp2p/go-libp2p v0.5.0
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-autonat-svc v0.1.0
github.com/libp2p/go-libp2p-connmgr v0.2.1
github.com/libp2p/go-libp2p-connmgr v0.2.1
github.com/libp2p/go-libp2p-core v0.3.0
github.com/libp2p/go-libp2p-core v0.3.0
github.com/libp2p/go-libp2p-crypto v0.1.0
github.com/libp2p/go-libp2p-host v0.1.0
github.com/libp2p/go-libp2p-interface-connmgr v0.1.0 // indirect
github.com/libp2p/go-libp2p-interface-pnet v0.1.0 // indirect
github.com/libp2p/go-libp2p-kad-dht v0.5.0
github.com/libp2p/go-libp2p-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-net v0.1.0 // indirect
github.com/libp2p/go-libp2p-protocol v0.1.0
github.com/libp2p/go-libp2p-quic-transport v0.2.2
github.com/libp2p/go-libp2p-quic-transport v0.2.2
github.com/libp2p/go-libp2p-routing v0.1.0
github.com/libp2p/go-libp2p-secio v0.2.1
github.com/libp2p/go-libp2p-secio v0.2.1
github.com/libp2p/go-libp2p-tls v0.1.2
github.com/libp2p/go-libp2p-tls v0.1.2
github.com/libp2p/go-libp2p-transport v0.1.0 // indirect
github.com/libp2p/go-stream-muxer v0.1.0 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-homedir v1.1.0
github.com/multiformats/go-multiaddr v0.2.0
github.com/multiformats/go-multiaddr v0.2.0
github.com/multiformats/go-multistream v0.1.0
github.com/multiformats/go-multistream v0.1.0
github.com/olekukonko/tablewriter v0.0.4
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v0.0.5
github.com/spf13/viper v1.6.1
github.com/spf13/viper v1.6.1
github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible // indirect
github.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible // indirect
github.com/whyrusleeping/go-smux-yamux v2.0.9+incompatible // indirect
github.com/whyrusleeping/yamux v1.2.0 // indirect
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc
newreleases.io/cmd v0.1.0
newreleases.io/newreleases v1.3.1
resenje.org/web v0.4.0
resenje.org/web v0.4.0
)
)
go.sum
View file @
95523d43
This diff is collapsed.
Click to expand it.
version.go
View file @
95523d43
package
bee
package
bee
// Version is a manually set semantic version number.
var
(
var
Version
=
"v0.1.0-alpha"
version
=
"v0.1.0"
// manually set semantic version number
commit
string
// automatically set git commit hash
Version
=
func
()
string
{
if
commit
!=
""
{
return
version
+
"-"
+
commit
}
return
version
}()
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment