Skip to content

Commit

Permalink
220-generate removed broken 'generate' dependencies and CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
bdebyl committed Sep 12, 2022
1 parent d189f4a commit a72b2c7
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 58 deletions.
14 changes: 1 addition & 13 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,9 @@ GO ?= $(shell which go)
# @echo "(re)installing $(GOBIN)/bingo-v0.2.2"
# @cd .bingo && $(GO) build -modfile=bingo.mod -o=$(GOBIN)/bingo-v0.2.2 "github.com/bwplotka/bingo"

EMBEDMD := $(GOBIN)/embedmd
$(EMBEDMD):
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/embedmd-v1.0.0"
@ $(GO) install github.com/campoy/embedmd@v1.0.0

GOTEST := $(GOBIN)/gotest
$(GOTEST):
$(GOTEST):
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/gotest-v0.0.4"
@ $(GO) install github.com/rakyll/gotest@v0.0.4

LICHE := $(GOBIN)/liche
$(LICHE):
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/liche-v0.0.0-20200229003944-f57a5d1c5be4"
@ $(GO) install github.com/raviqqe/liche@v0.0.0-20200229003944-f57a5d1c5be4

5 changes: 0 additions & 5 deletions .bingo/embedmd.mod

This file was deleted.

5 changes: 0 additions & 5 deletions .bingo/liche.mod

This file was deleted.

4 changes: 0 additions & 4 deletions .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ fi

BINGO="${gobin}/bingo-v0.2.2"

EMBEDMD="${gobin}/embedmd-v1.0.0"

GOLANGCI_LINT="${gobin}/golangci-lint-v1.27.0"

GOTEST="${gobin}/gotest-v0.0.4"

LICHE="${gobin}/liche-v0.0.0-20200229003944-f57a5d1c5be4"

8 changes: 0 additions & 8 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ steps:
- name: testdata
path: /drone/src/tmp/testdata/cache

- name: generate
image: golang:1.18.4
commands:
# Following environment tricks are because of unintended variable capture by flag library.
# This mitigates contamination happens when generating CLI flag documentation.
- env -i make PATH=$(which go):$PATH HOME=$HOME PWD=$PWD GO=$(which go) GOPATH=$(go env GOPATH) generate
- git diff --exit-code

- name: rebuild-cache
image: meltwater/drone-cache:v1.2.2
pull: always
Expand Down
24 changes: 1 addition & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ all: drone-cache
.PHONY: setup
setup: ## Setups dev environment
setup: vendor ; $(info $(M) running setup for development )
$(Q) make $(GOTEST) $(EMBEDMD) $(LICHE) $(GOLANGCI_LINT)
$(Q) make $(GOTEST) $(GOLANGCI_LINT)

drone-cache: ## Runs drone-cache target
drone-cache: vendor main.go $(wildcard *.go) $(wildcard */*.go) ; $(info $(M) running drone-cache )
Expand All @@ -54,32 +54,10 @@ clean: ; $(info $(M) running clean )
$(Q) rm -rf target
$(Q) rm -rf tmp

tmp/help.txt: drone-cache
-mkdir -p tmp
$(ROOT_DIR)/drone-cache --help &> tmp/help.txt

tmp/make_help.txt: Makefile
-mkdir -p tmp
$(Q) awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make <target>\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " %-15s\t %s\n", $$1, $$2 }' $(MAKEFILE_LIST) &> tmp/make_help.txt

README.md: tmp/help.txt tmp/make_help.txt $(EMBEDMD)
$(EMBEDMD) -w README.md

tmp/docs.txt: drone-cache
$(Q) echo "IMPLEMENT ME"

DOCS.md: tmp/docs.txt $(EMBEDMD)
$(EMBEDMD) -w DOCS.md

docs: ## Generates docs
docs: clean README.md DOCS.md $(LICHE)
$(Q) $(LICHE) --recursive docs --document-root .
$(Q) $(LICHE) --exclude "(goreportcard.com)" --document-root . *.md

generate: ## Generate documentation, website and yaml files,
generate: docs # site
$(Q) echo "Generated!"

.PHONY: vendor
vendor: ## Updates vendored copy of dependencies
vendor: ; $(info $(M) running vendor )
Expand Down

0 comments on commit a72b2c7

Please sign in to comment.