You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Rebuild semconvkit and verifyreadmes on changes (#7995)
This updates the tool build dependencies in `Makefile` so local tools are rebuilt when their source files change, instead of requiring manual deletion from `.tools`.
This commit is contained in:
+22
-12
@@ -37,13 +37,18 @@ jobs:
|
||||
path: .tools
|
||||
key: ${{ runner.os }}-${{ env.DEFAULT_GO_VERSION }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
|
||||
# The step below is needed to not rebuild all the build tools.
|
||||
- name: Set internal/tools/go.mod timestamp
|
||||
- name: Set internal/tools timestamps
|
||||
run: |
|
||||
filename="internal/tools/go.mod"
|
||||
unixtime=$(git log -1 --format="%at" -- "${filename}")
|
||||
touchtime=$(date -d @$unixtime +'%Y%m%d%H%M.%S')
|
||||
touch -t ${touchtime} "${filename}"
|
||||
ls -la --time-style=full-iso "${filename}"
|
||||
git ls-files \
|
||||
internal/tools/go.mod \
|
||||
internal/tools/semconvkit \
|
||||
internal/tools/verifyreadmes \
|
||||
| while IFS= read -r filename; do
|
||||
unixtime=$(git log -1 --format="%at" -- "${filename}")
|
||||
touchtime=$(date -d @"${unixtime}" +'%Y%m%d%H%M.%S')
|
||||
touch -t "${touchtime}" "${filename}"
|
||||
ls -la --time-style=full-iso "${filename}"
|
||||
done
|
||||
- name: Generate
|
||||
run: make generate
|
||||
- name: Run linters
|
||||
@@ -74,13 +79,18 @@ jobs:
|
||||
path: .tools
|
||||
key: ${{ runner.os }}-${{ env.DEFAULT_GO_VERSION }}-${{ env.cache-name }}-${{ hashFiles('./internal/tools/**') }}
|
||||
# The step below is needed to not rebuild all the build tools.
|
||||
- name: Set internal/tools/go.mod timestamp
|
||||
- name: Set internal/tools timestamps
|
||||
run: |
|
||||
filename="internal/tools/go.mod"
|
||||
unixtime=$(git log -1 --format="%at" -- "${filename}")
|
||||
touchtime=$(date -d @$unixtime +'%Y%m%d%H%M.%S')
|
||||
touch -t ${touchtime} "${filename}"
|
||||
ls -la --time-style=full-iso "${filename}"
|
||||
git ls-files \
|
||||
internal/tools/go.mod \
|
||||
internal/tools/semconvkit \
|
||||
internal/tools/verifyreadmes \
|
||||
| while IFS= read -r filename; do
|
||||
unixtime=$(git log -1 --format="%at" -- "${filename}")
|
||||
touchtime=$(date -d @"${unixtime}" +'%Y%m%d%H%M.%S')
|
||||
touch -t "${touchtime}" "${filename}"
|
||||
ls -la --time-style=full-iso "${filename}"
|
||||
done
|
||||
- name: Run govulncheck
|
||||
run: make govulncheck
|
||||
|
||||
|
||||
@@ -38,10 +38,14 @@ CROSSLINK = $(TOOLS)/crosslink
|
||||
$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink
|
||||
|
||||
SEMCONVKIT = $(TOOLS)/semconvkit
|
||||
SEMCONVKIT_FILES := $(sort $(shell find $(TOOLS_MOD_DIR)/semconvkit -type f))
|
||||
$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit
|
||||
$(TOOLS)/semconvkit: $(SEMCONVKIT_FILES)
|
||||
|
||||
VERIFYREADMES = $(TOOLS)/verifyreadmes
|
||||
VERIFYREADMES_FILES := $(sort $(shell find $(TOOLS_MOD_DIR)/verifyreadmes -type f))
|
||||
$(TOOLS)/verifyreadmes: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/verifyreadmes
|
||||
$(TOOLS)/verifyreadmes: $(VERIFYREADMES_FILES)
|
||||
|
||||
GOLANGCI_LINT = $(TOOLS)/golangci-lint
|
||||
$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/v2/cmd/golangci-lint
|
||||
|
||||
Reference in New Issue
Block a user