Skip to content

Commit

Permalink
dist
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Tognoli committed Oct 29, 2024
1 parent bd351d9 commit 5dad242
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.code-workspace
*.mmdb
node_modules/
dist/
5 changes: 4 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
@default:
just --list


@_prepare:
#!/usr/bin/env bash
cd data
Expand All @@ -11,6 +10,10 @@
go run main.go -i GeoLite2-ASN.json -o tmp/GeoLite2-ASN.mmdb -t GeoLite2-ASN
go run main.go -i GeoLite2-Country.json -o tmp/GeoLite2-Country.mmdb -t GeoLite2-Country
dist:
#!/usr/bin/env bash
./utils/dist.sh
format:
gofumpt -w -extra .

Expand Down
15 changes: 15 additions & 0 deletions utils/dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
scriptPath="$(sourcePath=`readlink -f "$0"` && echo "${sourcePath%/*}")"
basePath="$(cd $scriptPath/.. && pwd)"

cd $basePath

[[ -e "$basePath/dist" ]] && rm -rf "$basePath/dist"


path="dist/plugins-local/src/github.com/thiagotognoli/traefikgeoip"

mkdir -p "$path"
cp go.mod go.sum .traefik.yml middleware.go "$path"
cp -R geoip2 lib "$path"

0 comments on commit 5dad242

Please sign in to comment.