Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Go Modules to tooling #1901

Merged
merged 4 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
go-version: 'stable'

- name: Run Go unit tests
run: go test tools/*.go
run: go test -C ./tools .

- name: Install dependencies
run: sudo apt install -y autopoint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tld-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
# Run once a day at 15:00 UTC
- cron: '0 15 * * *'

permissions:
contents: read

Expand All @@ -26,7 +26,7 @@ jobs:
go-version: 'stable'

- name: Run unit tests
run: go test tools/*.go
run: go test -C ./tools .
aaomidi marked this conversation as resolved.
Show resolved Hide resolved

- name: Set current date
id: get-date
Expand All @@ -49,7 +49,7 @@ jobs:
✅ autopull
🚩ICANN (IANA/ICP-3) Section
delete-branch: true

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
Expand Down
3 changes: 3 additions & 0 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/publicsuffix/list/tools

go 1.21.4
aaomidi marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 4 additions & 2 deletions tools/patchnewgtlds
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

set -e
set -o pipefail
set -x

if ! [ -x "$(command -v go)" ]
then
echo "error: a go binary in \$PATH is required to run newgtlds.go" >&2
exit 1
fi

BASEDIR=$(dirname "$0")
SCRIPT=$(realpath "$0")
BASEDIR=$(dirname "$SCRIPT")

go run "$BASEDIR/newgtlds.go" \
go run -C "$BASEDIR/" . \
-overwrite \
-psl-dat-file="$BASEDIR/../public_suffix_list.dat"