From 79cd3a14ae20b6dc2b1428b5a5b71587069db2ed Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 21 Sep 2023 17:11:23 -0400 Subject: [PATCH] feat: rename to cdnsd Signed-off-by: Chris Gianelloni --- .dockerignore | 2 +- .github/workflows/ci-docker.yml | 2 +- .github/workflows/publish.yml | 10 +++++----- .gitignore | 2 +- Dockerfile | 6 +++--- README.md | 2 +- cmd/{chnsd => cdnsd}/main.go | 10 +++++----- go.mod | 2 +- internal/dns/dns.go | 6 +++--- internal/indexer/indexer.go | 6 +++--- internal/logging/logging.go | 2 +- internal/state/state.go | 4 ++-- 12 files changed, 27 insertions(+), 27 deletions(-) rename cmd/{chnsd => cdnsd}/main.go (87%) diff --git a/.dockerignore b/.dockerignore index c4581de..01f2ae5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,5 @@ .git/ .github/ Dockerfule -chnsd +cdnsd README.md diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml index 0561ad4..310fffa 100644 --- a/.github/workflows/ci-docker.yml +++ b/.github/workflows/ci-docker.yml @@ -6,7 +6,7 @@ on: paths: ['Dockerfile','cmd/**','docs/**','internal/**','go.*','.github/workflows/ci-docker.yml'] env: - GHCR_IMAGE_NAME: ghcr.io/blinklabs-io/chnsd + GHCR_IMAGE_NAME: ghcr.io/blinklabs-io/cdnsd jobs: docker: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 63cd72d..fb85cc7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,16 +56,16 @@ jobs: - name: Upload release asset if: startsWith(github.ref, 'refs/tags/') run: | - _filename=chnsd-${{ env.RELEASE_TAG }}-${{ matrix.os }}-${{ matrix.arch }} + _filename=cdnsd-${{ env.RELEASE_TAG }}-${{ matrix.os }}-${{ matrix.arch }} if [[ ${{ matrix.os }} == windows ]]; then _filename=${_filename}.exe fi - mv chnsd ${_filename} + mv cdnsd ${_filename} curl \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/octet-stream" \ --data-binary @${_filename} \ - https://uploads.github.com/repos/${{ github.repository_owner }}/chnsd/releases/${{ needs.create-draft-release.outputs.RELEASE_ID }}/assets?name=${_filename} + https://uploads.github.com/repos/${{ github.repository_owner }}/cdnsd/releases/${{ needs.create-draft-release.outputs.RELEASE_ID }}/assets?name=${_filename} build-images: runs-on: ubuntu-latest @@ -92,7 +92,7 @@ jobs: uses: docker/metadata-action@v4 with: images: | - blinklabs/chnsd + blinklabs/cdnsd ghcr.io/${{ github.repository }} tags: | # Only version, no revision @@ -114,7 +114,7 @@ jobs: with: username: blinklabs password: ${{ secrets.DOCKER_PASSWORD }} - repository: blinklabs/chnsd + repository: blinklabs/cdnsd readme-filepath: ./README.md short-description: "DNS resolver for Handshake SLDs on Cardano" diff --git a/.gitignore b/.gitignore index 63262a5..7d440cc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ *.dll *.so *.dylib -/chnsd +/cdnsd # Test binary, built with `go test -c` *.test diff --git a/Dockerfile b/Dockerfile index b7c0c71..88d2090 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /code COPY . . RUN make build -FROM cgr.dev/chainguard/glibc-dynamic AS chnsd -COPY --from=build /code/chnsd /bin/ -ENTRYPOINT ["chnsd"] +FROM cgr.dev/chainguard/glibc-dynamic AS cdnsd +COPY --from=build /code/cdnsd /bin/ +ENTRYPOINT ["cdnsd"] diff --git a/README.md b/README.md index 7bf0461..3fe335e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# chnsd +# cdnsd Resolver for .cardano Handshake domains diff --git a/cmd/chnsd/main.go b/cmd/cdnsd/main.go similarity index 87% rename from cmd/chnsd/main.go rename to cmd/cdnsd/main.go index 644667d..36223aa 100644 --- a/cmd/chnsd/main.go +++ b/cmd/cdnsd/main.go @@ -13,11 +13,11 @@ import ( _ "net/http/pprof" "os" - "github.com/blinklabs-io/chnsd/internal/config" - "github.com/blinklabs-io/chnsd/internal/dns" - "github.com/blinklabs-io/chnsd/internal/indexer" - "github.com/blinklabs-io/chnsd/internal/logging" - "github.com/blinklabs-io/chnsd/internal/state" + "github.com/blinklabs-io/cdnsd/internal/config" + "github.com/blinklabs-io/cdnsd/internal/dns" + "github.com/blinklabs-io/cdnsd/internal/indexer" + "github.com/blinklabs-io/cdnsd/internal/logging" + "github.com/blinklabs-io/cdnsd/internal/state" ) var cmdlineFlags struct { diff --git a/go.mod b/go.mod index 1922750..37049e0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/blinklabs-io/chnsd +module github.com/blinklabs-io/cdnsd go 1.20 diff --git a/internal/dns/dns.go b/internal/dns/dns.go index 0cef299..6a8b77a 100644 --- a/internal/dns/dns.go +++ b/internal/dns/dns.go @@ -6,9 +6,9 @@ import ( "net" "strings" - "github.com/blinklabs-io/chnsd/internal/config" - "github.com/blinklabs-io/chnsd/internal/logging" - "github.com/blinklabs-io/chnsd/internal/state" + "github.com/blinklabs-io/cdnsd/internal/config" + "github.com/blinklabs-io/cdnsd/internal/logging" + "github.com/blinklabs-io/cdnsd/internal/state" "github.com/miekg/dns" ) diff --git a/internal/indexer/indexer.go b/internal/indexer/indexer.go index d490eb3..5d78d29 100644 --- a/internal/indexer/indexer.go +++ b/internal/indexer/indexer.go @@ -3,9 +3,9 @@ package indexer import ( "encoding/hex" - "github.com/blinklabs-io/chnsd/internal/config" - "github.com/blinklabs-io/chnsd/internal/logging" - "github.com/blinklabs-io/chnsd/internal/state" + "github.com/blinklabs-io/cdnsd/internal/config" + "github.com/blinklabs-io/cdnsd/internal/logging" + "github.com/blinklabs-io/cdnsd/internal/state" "github.com/blinklabs-io/gouroboros/cbor" ocommon "github.com/blinklabs-io/gouroboros/protocol/common" diff --git a/internal/logging/logging.go b/internal/logging/logging.go index b31cc26..f17d3b6 100644 --- a/internal/logging/logging.go +++ b/internal/logging/logging.go @@ -4,7 +4,7 @@ import ( "log" "time" - "github.com/blinklabs-io/chnsd/internal/config" + "github.com/blinklabs-io/cdnsd/internal/config" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) diff --git a/internal/state/state.go b/internal/state/state.go index 343be4d..ac78dd7 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" - "github.com/blinklabs-io/chnsd/internal/config" - "github.com/blinklabs-io/chnsd/internal/logging" + "github.com/blinklabs-io/cdnsd/internal/config" + "github.com/blinklabs-io/cdnsd/internal/logging" "github.com/dgraph-io/badger/v4" )