mirror of
https://github.com/onsonr/hway.git
synced 2025-03-10 04:57:08 +00:00
refactor: restructure project and update goreleaser configuration
This commit is contained in:
parent
21ff6cbf30
commit
7fef4a8522
@ -16,8 +16,6 @@ builds:
|
||||
flags:
|
||||
- -mod=readonly
|
||||
- -trimpath
|
||||
goamd64:
|
||||
- v1
|
||||
ldflags:
|
||||
- -X main.version={{.Version}}
|
||||
- -X main.commit={{.Commit}}
|
||||
|
4
Makefile
4
Makefile
@ -11,10 +11,10 @@ export RELEASE_DATE="$(date +%Y).$(date +%V).$(date +%u)"
|
||||
all: install test
|
||||
|
||||
build: go.sum
|
||||
go build -o bin/hway .
|
||||
go build -o bin/hway ./cmd
|
||||
|
||||
install: go.sum
|
||||
go install -mod=readonly .
|
||||
go install -mod=readonly ./cmd
|
||||
|
||||
########################################
|
||||
### Tools & dependencies
|
||||
|
194
dist/config.yaml
vendored
Normal file
194
dist/config.yaml
vendored
Normal file
@ -0,0 +1,194 @@
|
||||
version: 2
|
||||
project_name: sonr
|
||||
release:
|
||||
github:
|
||||
owner: onsonr
|
||||
name: sonr
|
||||
replace_existing_draft: true
|
||||
tag: '{{ .PrefixedTag }}'
|
||||
name_template: '{{ .Tag }} | {{ .Env.RELEASE_DATE }}'
|
||||
extra_files:
|
||||
- glob: ./README*
|
||||
replace_existing_artifacts: true
|
||||
brews:
|
||||
- name: hway
|
||||
repository:
|
||||
owner: onsonr
|
||||
name: homebrew-tap
|
||||
token: '{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}'
|
||||
branch: master
|
||||
commit_author:
|
||||
name: goreleaserbot
|
||||
email: bot@goreleaser.com
|
||||
commit_msg_template: Brew formula update for {{ .ProjectName }} version {{ .PrefixedTag }}
|
||||
directory: Formula
|
||||
caveats: Run a local hway node and access it with the hway proxy
|
||||
dependencies:
|
||||
- name: ipfs
|
||||
description: Sonr is a decentralized, permissionless, and censorship-resistant identity network.
|
||||
homepage: https://onsonr.dev
|
||||
ids:
|
||||
- hway
|
||||
goarm: "6"
|
||||
goamd64: v1
|
||||
builds:
|
||||
- id: hway
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
goamd64:
|
||||
- v1
|
||||
go386:
|
||||
- sse2
|
||||
goarm:
|
||||
- "6"
|
||||
goarm64:
|
||||
- v8.0
|
||||
gomips:
|
||||
- hardfloat
|
||||
goppc64:
|
||||
- power8
|
||||
goriscv64:
|
||||
- rva20u64
|
||||
targets:
|
||||
- linux_amd64_v1
|
||||
- linux_arm64_v8.0
|
||||
- darwin_amd64_v1
|
||||
- darwin_arm64_v8.0
|
||||
dir: .
|
||||
main: ./cmd
|
||||
binary: hway
|
||||
builder: go
|
||||
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||
gobinary: go
|
||||
command: build
|
||||
ldflags:
|
||||
- -X main.version={{.Version}}
|
||||
- -X main.commit={{.Commit}}
|
||||
- -X main.date={{.Date}}
|
||||
flags:
|
||||
- -mod=readonly
|
||||
- -trimpath
|
||||
archives:
|
||||
- id: hway
|
||||
builds:
|
||||
- hway
|
||||
name_template: hway_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }}
|
||||
format: tar.gz
|
||||
wrap_in_directory: "true"
|
||||
files:
|
||||
- src: README*
|
||||
nfpms:
|
||||
- file_name_template: hway_{{ .Os }}_{{ .Arch }}{{ .ConventionalExtension }}
|
||||
package_name: hway
|
||||
dependencies:
|
||||
- ipfs
|
||||
contents:
|
||||
- src: README*
|
||||
dst: /usr/share/doc/hway
|
||||
id: hway
|
||||
builds:
|
||||
- hway
|
||||
formats:
|
||||
- rpm
|
||||
- deb
|
||||
- apk
|
||||
section: net
|
||||
priority: optional
|
||||
vendor: Sonr
|
||||
homepage: https://onsonr.dev
|
||||
maintainer: Sonr <support@onsonr.dev>
|
||||
description: Sonr Highway is a decentralized, permissionless, and censorship-resistant identity network proxy.
|
||||
license: Apache 2.0
|
||||
bindir: /usr/bin
|
||||
libdirs:
|
||||
header: /usr/include
|
||||
carchive: /usr/lib
|
||||
cshared: /usr/lib
|
||||
snapshot:
|
||||
version_template: '{{ .Version }}-SNAPSHOT-{{ .ShortCommit }}'
|
||||
checksum:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
||||
algorithm: sha256
|
||||
dockers:
|
||||
- goos: linux
|
||||
goarch: amd64
|
||||
goarm: "6"
|
||||
goamd64: v1
|
||||
dockerfile: Dockerfile
|
||||
image_templates:
|
||||
- onsonr/hway:{{ .Tag }}
|
||||
- onsonr/hway:latest
|
||||
- ghcr.io/onsonr/hway:{{ .Tag }}
|
||||
- ghcr.io/onsonr/hway:latest
|
||||
use: docker
|
||||
changelog:
|
||||
format: '{{ .SHA }}: {{ .Message }} ({{ with .AuthorUsername }}@{{ . }}{{ else }}{{ .AuthorName }} <{{ .AuthorEmail }}>{{ end }})'
|
||||
dist: dist
|
||||
env_files:
|
||||
github_token: ~/.config/goreleaser/github_token
|
||||
gitlab_token: ~/.config/goreleaser/gitlab_token
|
||||
gitea_token: ~/.config/goreleaser/gitea_token
|
||||
source:
|
||||
name_template: '{{ .ProjectName }}-{{ .Version }}'
|
||||
format: tar.gz
|
||||
gomod:
|
||||
gobinary: go
|
||||
announce:
|
||||
twitter:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
mastodon:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
server: ""
|
||||
reddit:
|
||||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
||||
url_template: '{{ .ReleaseURL }}'
|
||||
slack:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
username: GoReleaser
|
||||
discord:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
author: GoReleaser
|
||||
color: "3888754"
|
||||
icon_url: https://goreleaser.com/static/avatar.png
|
||||
teams:
|
||||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
color: '#2D313E'
|
||||
icon_url: https://goreleaser.com/static/avatar.png
|
||||
smtp:
|
||||
subject_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
||||
body_template: 'You can view details from: {{ .ReleaseURL }}'
|
||||
mattermost:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
||||
username: GoReleaser
|
||||
linkedin:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
telegram:
|
||||
enabled: true
|
||||
message_template: '{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out{{ mdv2escape "!" }} Check it out at {{ mdv2escape .ReleaseURL }}'
|
||||
chat_id: "-1002222617755"
|
||||
parse_mode: MarkdownV2
|
||||
webhook:
|
||||
message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}'
|
||||
content_type: application/json; charset=utf-8
|
||||
opencollective:
|
||||
title_template: '{{ .Tag }}'
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>'
|
||||
bluesky:
|
||||
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
||||
git:
|
||||
tag_sort: -version:refname
|
||||
github_urls:
|
||||
download: https://github.com
|
||||
gitlab_urls:
|
||||
download: https://gitlab.com
|
||||
partial:
|
||||
by: goos
|
||||
nightly:
|
||||
version_template: '{{ incpatch .Version }}-{{ .ShortCommit }}-nightly'
|
||||
tag_name: nightly
|
12
dist/metadata.json
vendored
Normal file
12
dist/metadata.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"project_name": "sonr",
|
||||
"tag": "v0.0.0",
|
||||
"previous_tag": "",
|
||||
"version": "0.0.0-SNAPSHOT-21ff6cb",
|
||||
"commit": "21ff6cbf305410a6059e489c369c268fa6cb2b1d",
|
||||
"date": "2025-01-04T21:15:36.339986-05:00",
|
||||
"runtime": {
|
||||
"goos": "darwin",
|
||||
"goarch": "arm64"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user