From 4e00580faeab6798a1cb817ab68d6f4bfdfc5a90 Mon Sep 17 00:00:00 2001 From: mpenning Date: Tue, 28 Nov 2023 07:03:07 -0600 Subject: [PATCH 1/2] Roll version number --- sphinx-doc/installation.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx-doc/installation.rst b/sphinx-doc/installation.rst index 6159edd..e9c82ec 100755 --- a/sphinx-doc/installation.rst +++ b/sphinx-doc/installation.rst @@ -99,7 +99,7 @@ Alternatively you can install with pip_: :: If you have a specific version of ciscoconfparse in mind, you can specify that at the command-line :: - pip install ciscoconfparse==1.9.37 + pip install ciscoconfparse==1.9.40 Install with setuptools @@ -113,7 +113,7 @@ If you don't have pip_, you can use setuptools_... :: If you have a specific version of ciscoconfparse in mind, you can specify that at the command-line :: - easy_install -U ciscoconfparse==1.9.37 + easy_install -U ciscoconfparse==1.9.40 Install from the source ~~~~~~~~~~~~~~~~~~~~~~~ From f90b4e1e1d0973ba874bc5c3d53c87590db3ba09 Mon Sep 17 00:00:00 2001 From: mpenning Date: Tue, 28 Nov 2023 07:03:31 -0600 Subject: [PATCH 2/2] Fix deploy_docs --- dev_tools/deploy_docs/Makefile | 35 +++++++--------------------- dev_tools/deploy_docs/deploy_docs.go | 5 ++-- dev_tools/deploy_docs/go.mod | 4 ++-- 3 files changed, 13 insertions(+), 31 deletions(-) diff --git a/dev_tools/deploy_docs/Makefile b/dev_tools/deploy_docs/Makefile index d9f4501..3536cd4 100644 --- a/dev_tools/deploy_docs/Makefile +++ b/dev_tools/deploy_docs/Makefile @@ -28,16 +28,12 @@ build: # Very Important... do not skip the backup step here... mkdir -p $(GO_BIN_DIR) make backup - -rm go.mod - go mod init deploy_docs - go mod tidy -make fmt make dep make lint go build $(GO_SOURCE_FILE) strip deploy_docs -make lint - #cd src && go vet . ############################################################################ # # Replace this line with PLATFORM detection... @@ -66,35 +62,20 @@ fmt: go fmt $(GO_SOURCE_FILE) .PHONY: fmt -install_linters: - @echo "$(COL_GREEN)>> installing linting tools$(COL_END)" - go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest - go install github.com/kisielk/errlint@latest - go install github.com/go-critic/go-critic/cmd/gocritic@latest - go install honnef.co/go/tools/cmd/staticlint@latest - go install golang.org/x/tools/cmd/goimports@latest - go install github.com/mgechev/revive -.PHONY: install_linters - lint: @echo "$(COL_GREEN)>> checking / linting the project$(COL_END)" - @echo "$(COL_CYAN)>> running go vet$(COL_END)" - go vet ./... - @echo "$(COL_CYAN)>> running shadow$(COL_END)" - shadow $(GO_SOURCE_FILE) - @echo "$(COL_CYAN)>> fixing suboptimal / unreferenced imports$(COL_END)" - goimports $(GO_SOURCE_FILE) > $(GO_SOURCE_FILE).imports - mv $(GO_SOURCE_FILE).imports $(GO_SOURCE_FILE) - @echo "$(COL_CYAN)>> running gocritic$(COL_END)" - gocritic check -enableAll $(GO_SOURCE_FILE) - @echo "$(COL_CYAN)>> running errcheck$(COL_END)" - errcheck -verbose $(GO_SOURCE_FILE) + revive -config revive_lint.toml . .PHONY: lint dep: @echo "$(COL_GREEN)>> getting deploy_docs dependencies$(COL_END)" - go get github.com/melbahja/goph@latest - go get github.com/gleich/logoru@latest + @echo "$(COL_CYAN)>> delete old go files$(COL_END)" + -rm go.mod + -rm go.sum + @echo "$(COL_CYAN)>> create a new go.mod$(COL_END)" + go mod init github.com/mpenning/ciscoconfparse/dev_tools/deploy_docs + go mod tidy + go mod download .PHONY: dep backup: diff --git a/dev_tools/deploy_docs/deploy_docs.go b/dev_tools/deploy_docs/deploy_docs.go index e843999..6e5ae69 100644 --- a/dev_tools/deploy_docs/deploy_docs.go +++ b/dev_tools/deploy_docs/deploy_docs.go @@ -1,3 +1,4 @@ +// deploy_docs tool for deploying ciscoconfparse docs to pennington.net package main import ( @@ -13,13 +14,13 @@ import ( // Declare all variables here... var ( - dochost string = "" + dochost string ) func main() { // define CLI flags here... '--dochost' is saved as string variable -> dochost - flag.StringVar(&dochost, "dochost", "127.0.0.1", "host to upload docs to.") + flag.StringVar(&dochost, "dochost", "chestnut.he.net", "host to upload docs to.") flag.Parse() fmt.Printf("A script to upload CiscoConfParse docs to %s.\n", dochost) diff --git a/dev_tools/deploy_docs/go.mod b/dev_tools/deploy_docs/go.mod index d019525..c45edf2 100644 --- a/dev_tools/deploy_docs/go.mod +++ b/dev_tools/deploy_docs/go.mod @@ -1,6 +1,6 @@ -module deploy_docs +module github.com/mpenning/ciscoconfparse/dev_tools/deploy_docs -go 1.20 +go 1.21.4 require ( github.com/gleich/logoru v0.0.0-20230101033757-d86cd895c7a1