Skip to content

Commit

Permalink
Add initial .goreleaser.yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincarr committed Apr 17, 2024
1 parent aa564f1 commit e9260c8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/c.out
/data/*
/delta/applied/*
/dist/*
/dist/
/domainify
/go.work
/node_modules/*
Expand Down
46 changes: 46 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: 1

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

release:
github:
owner: ProfoundNetworks
name: domainify

env_files:
github_token: ~/.gh_goreleaser

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ used by browsers for restricting the scope of cookies across hostnames.
Usage
-----

domainify takes hostnames as arguments, and outputs entity domains to
standard output, one entity domain per line. A bad hostname or an error
mapping to an entity domain will result in a blank line being output for
that input.

Arguments can be givin either as command line arguments, or via standard
input, one hostname per line, with the `--stdin` option.
`domainify` takes hostnames as command line arguments or from stdin (with
the `--stdin` option, and outputs entity domains to standard output, one
domain per line. A bad hostname or an error mapping a hostname to an entity
domain will result in a blank line being output for that input (and sometimes
an error message to standard error).

For example:

Expand All @@ -33,7 +31,7 @@ profound.net

wikipedia.org

$ echo -e "hosted.l.google.com\ncom\n31.pool85-61-184.dynamic.orange.es" |
$ echo -e "hosted.l.google.com\ncom\npool85-61.dynamic.orange.es" |
domainify --stdin
google.com

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module github.com/ProfoundNetworks/domainify
go 1.22.1

require (
github.com/ProfoundNetworks/gpntest v0.0.0-20230919053257-5438c4e72e65
github.com/ProfoundNetworks/gpnutil v0.20240405.1
github.com/jessevdk/go-flags v1.5.0
)

require (
github.com/ProfoundNetworks/gpntest v0.0.0-20230919053257-5438c4e72e65 // indirect
github.com/ProfoundNetworks/net v0.0.0-20240405052550-5a324bbc9278 // indirect
github.com/adrg/strutil v0.3.1 // indirect
github.com/google/go-cmp v0.5.9 // indirect
Expand Down

0 comments on commit e9260c8

Please sign in to comment.