mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Ensure go.work.sum is updated (#89996)
This commit is contained in:
parent
db68d58d52
commit
c6663ce6be
26
.github/workflows/pr-go-workspace-check.yml
vendored
26
.github/workflows/pr-go-workspace-check.yml
vendored
@ -4,11 +4,6 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- '**/go.work'
|
|
||||||
- '**/go.work.sum'
|
|
||||||
- '**/go.mod'
|
|
||||||
- '**/go.sum'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@ -24,28 +19,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
|
|
||||||
- name: Workspace Sync
|
- name: Update workspace
|
||||||
run: go work sync
|
run: make update-workspace
|
||||||
|
|
||||||
- name: Check for go mod & workspace changes
|
- name: Check for go mod & workspace changes
|
||||||
run: |
|
run: |
|
||||||
if ! git diff --exit-code --quiet; then
|
if ! git diff --exit-code --quiet; then
|
||||||
echo "Changes detected:"
|
echo "Changes detected:"
|
||||||
git diff
|
git diff
|
||||||
echo "Please run 'go work sync' and commit the changes."
|
echo "Please run 'make update-workspace' and commit the changes."
|
||||||
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: make build-go
|
|
||||||
|
|
||||||
- name: Check for go workspace changes
|
|
||||||
run: |
|
|
||||||
if ! git diff --exit-code --quiet; then
|
|
||||||
echo "Changes detected:"
|
|
||||||
git diff
|
|
||||||
echo "Please run 'make build-go' and commit the changes."
|
|
||||||
echo "If there is a change in enterprise dependencies, please update pkg/extensions/main.go."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
7
Makefile
7
Makefile
@ -169,8 +169,13 @@ fix-cue: $(CUE)
|
|||||||
gen-jsonnet:
|
gen-jsonnet:
|
||||||
go generate ./devenv/jsonnet
|
go generate ./devenv/jsonnet
|
||||||
|
|
||||||
|
.PHONY: update-workspace
|
||||||
|
update-workspace:
|
||||||
|
@echo "updating workspace"
|
||||||
|
$(GO) mod download
|
||||||
|
|
||||||
.PHONY: build-go
|
.PHONY: build-go
|
||||||
build-go: gen-go ## Build all Go binaries.
|
build-go: update-workspace gen-go ## Build all Go binaries.
|
||||||
@echo "build go files"
|
@echo "build go files"
|
||||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||||
|
|
||||||
|
1052
go.work.sum
1052
go.work.sum
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user