updated qrz
This commit is contained in:
parent
b9e73370f9
commit
d6a47080ac
115
.drone.yml
115
.drone.yml
@ -1,14 +1,30 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: cleanup-before
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: clean
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- rm -rf /build/*
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
path: /build
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
host:
|
||||||
|
path: /tmp/qrz/build
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default-linux-amd64
|
name: default-linux-amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: packr2
|
|
||||||
image: golang
|
|
||||||
commands:
|
|
||||||
- go get -u github.com/gobuffalo/packr/v2/packr2
|
|
||||||
- go build -o packr2 -mod=mod github.com/gobuffalo/packr/v2/packr2
|
|
||||||
- name: build
|
- name: build
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
@ -16,37 +32,33 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
GOOS: linux
|
GOOS: linux
|
||||||
GOARCH: amd64
|
GOARCH: amd64
|
||||||
- name: release
|
volumes:
|
||||||
image: plugins/gitea-release
|
- name: build
|
||||||
settings:
|
path: /build
|
||||||
base_url: https://git.paulbsd.com
|
|
||||||
api_key:
|
volumes:
|
||||||
from_secret: gitea_token
|
- name: build
|
||||||
files: "*.tar.gz"
|
host:
|
||||||
checksum:
|
path: /tmp/qrz/build
|
||||||
- sha256
|
|
||||||
- sha512
|
depends_on:
|
||||||
when:
|
- cleanup-before
|
||||||
event: tag
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default-linux-arm64
|
name: gitea-release
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: packr2
|
- name: move
|
||||||
image: golang
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- go get -u github.com/gobuffalo/packr/v2/packr2
|
- mv build/* ./
|
||||||
- go build -o packr2 -mod=mod github.com/gobuffalo/packr/v2/packr2
|
volumes:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang
|
path: /drone/src/build
|
||||||
commands:
|
when:
|
||||||
- ./ci-build.sh build
|
event: tag
|
||||||
environment:
|
|
||||||
GOOS: linux
|
|
||||||
GOARCH: arm64
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
@ -57,5 +69,50 @@ steps:
|
|||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
- sha512
|
- sha512
|
||||||
|
title: VERSION
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
path: /drone/src/build
|
||||||
when:
|
when:
|
||||||
event: tag
|
event: tag
|
||||||
|
- name: ls
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- find .
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
path: /drone/src/build
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
host:
|
||||||
|
path: /tmp/qrz/build
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- default-linux-amd64
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: cleanup-after
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: clean
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- rm -rf /build/*
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
path: /build
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: build
|
||||||
|
host:
|
||||||
|
path: /tmp/qrz/build
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- gitea-release
|
||||||
|
24
ci-build.sh
24
ci-build.sh
@ -10,38 +10,42 @@ GOOPTIONS="-mod=vendor"
|
|||||||
SRCFILES=cmd/qrz/*.go
|
SRCFILES=cmd/qrz/*.go
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
echo "Begin of build"
|
||||||
if [[ ! -z $DRONE_TAG ]]
|
if [[ ! -z $DRONE_TAG ]]
|
||||||
then
|
then
|
||||||
|
echo "Drone tag set, let's do a release"
|
||||||
VERSION=$DRONE_TAG
|
VERSION=$DRONE_TAG
|
||||||
|
echo "${PROJECTNAME} ${VERSION}" > /build/VERSION
|
||||||
elif [[ ! -z $DRONE_TAG ]]
|
elif [[ ! -z $DRONE_TAG ]]
|
||||||
then
|
then
|
||||||
|
echo "Drone not set, let's only do a build"
|
||||||
VERSION=$DRONE_COMMIT
|
VERSION=$DRONE_COMMIT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
|
if [[ ! -z $VERSION && ! -z $GOOS && ! -z $GOARCH ]]
|
||||||
then
|
then
|
||||||
|
echo "Let's set a release name"
|
||||||
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
|
RELEASENAME=${PROJECTNAME}-${VERSION}-${GOOS}-${GOARCH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running packr2"
|
echo "Getting packr2 and building embedded files"
|
||||||
if [[ -f ./packr2 ]]
|
go get -u github.com/gobuffalo/packr/v2/packr2
|
||||||
then
|
packr2
|
||||||
./packr2
|
|
||||||
else
|
|
||||||
echo "packr2 binary not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Building project"
|
echo "Building project"
|
||||||
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
go build -o ${PROJECTNAME} ${GOOPTIONS} ${SRCFILES}
|
||||||
|
|
||||||
if [[ ! -z $DRONE_TAG ]]
|
if [[ ! -z $DRONE_TAG ]]
|
||||||
then
|
then
|
||||||
tar -czvf ${RELEASENAME}.tar.gz ${PROJECTNAME}
|
echo "Let's make archives"
|
||||||
|
mkdir -p /build
|
||||||
|
tar -czvf /build/${RELEASENAME}.tar.gz ${PROJECTNAME}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Removing binary file"
|
echo "Removing binary file"
|
||||||
rm ${PROJECTNAME}
|
rm ${PROJECTNAME}
|
||||||
|
|
||||||
|
echo "End of build"
|
||||||
}
|
}
|
||||||
|
|
||||||
clean() {
|
clean() {
|
||||||
@ -56,5 +60,7 @@ case $1 in
|
|||||||
clean
|
clean
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
echo "No options choosen"
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
2
go.mod
2
go.mod
@ -37,7 +37,7 @@ require (
|
|||||||
golang.org/x/sys v0.0.0-20201204225414-ed752295db88 // indirect
|
golang.org/x/sys v0.0.0-20201204225414-ed752295db88 // indirect
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
|
||||||
golang.org/x/text v0.3.4 // indirect
|
golang.org/x/text v0.3.4 // indirect
|
||||||
golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0 // indirect
|
golang.org/x/tools v0.0.0-20201204222352-654352759326 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/protobuf v1.25.0 // indirect
|
google.golang.org/protobuf v1.25.0 // indirect
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
|
2
go.sum
2
go.sum
@ -544,6 +544,8 @@ golang.org/x/tools v0.0.0-20200308013534-11ec41452d41 h1:9Di9iYgOt9ThCipBxChBVhg
|
|||||||
golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
golang.org/x/tools v0.0.0-20200308013534-11ec41452d41/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
|
||||||
golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0 h1:ZE8TbQqVy3d5tnnRBBhbtisccQkE4JMRX0YdHumcbNc=
|
golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0 h1:ZE8TbQqVy3d5tnnRBBhbtisccQkE4JMRX0YdHumcbNc=
|
||||||
golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
|
golang.org/x/tools v0.0.0-20201204222352-654352759326 h1:XKLw9EEEfGJFE2K5Ni4nXgtFBIfI+zKPIi2SlRYmIG4=
|
||||||
|
golang.org/x/tools v0.0.0-20201204222352-654352759326/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
@ -41,7 +41,46 @@ func (config *Config) GetConfig() error {
|
|||||||
|
|
||||||
config.URLBase = `http://groupe-frs.hamstation.eu/index_qrz_liste_%s.php`
|
config.URLBase = `http://groupe-frs.hamstation.eu/index_qrz_liste_%s.php`
|
||||||
|
|
||||||
config.QrzGroups = []string{"01", "03", "09", "103", "104", "107", "119", "13", "146", "147", "15", "156", "16", "161", "163", "18", "188", "2", "214", "233", "25", "26", "29", "30", "31", "32", "34", "43", "44", "49", "54", "64", "66", "76", "79", "84", "97", "98"}
|
config.QrzGroups = []string{
|
||||||
|
"01",
|
||||||
|
"03",
|
||||||
|
"09",
|
||||||
|
"103",
|
||||||
|
"104",
|
||||||
|
"107",
|
||||||
|
"119",
|
||||||
|
"13",
|
||||||
|
"14",
|
||||||
|
"146",
|
||||||
|
"147",
|
||||||
|
"15",
|
||||||
|
"156",
|
||||||
|
"16",
|
||||||
|
"161",
|
||||||
|
"163",
|
||||||
|
"18",
|
||||||
|
"188",
|
||||||
|
"2",
|
||||||
|
"214",
|
||||||
|
"233",
|
||||||
|
"25",
|
||||||
|
"26",
|
||||||
|
"29",
|
||||||
|
"30",
|
||||||
|
"31",
|
||||||
|
"32",
|
||||||
|
"34",
|
||||||
|
"43",
|
||||||
|
"44",
|
||||||
|
"49",
|
||||||
|
"54",
|
||||||
|
"64",
|
||||||
|
"66",
|
||||||
|
"76",
|
||||||
|
"79",
|
||||||
|
"84",
|
||||||
|
"97",
|
||||||
|
"98"}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -160,7 +160,7 @@ golang.org/x/text/secure/bidirule
|
|||||||
golang.org/x/text/transform
|
golang.org/x/text/transform
|
||||||
golang.org/x/text/unicode/bidi
|
golang.org/x/text/unicode/bidi
|
||||||
golang.org/x/text/unicode/norm
|
golang.org/x/text/unicode/norm
|
||||||
# golang.org/x/tools v0.0.0-20201118215654-4d9c4f8a78b0
|
# golang.org/x/tools v0.0.0-20201204222352-654352759326
|
||||||
## explicit
|
## explicit
|
||||||
# google.golang.org/appengine v1.6.7
|
# google.golang.org/appengine v1.6.7
|
||||||
## explicit
|
## explicit
|
||||||
|
Loading…
Reference in New Issue
Block a user