Skip to content

Commit

Permalink
Merge pull request #14439 from github/mbg/go/workspace-experiments
Browse files Browse the repository at this point in the history
Go: Move `go.mod` into `extractor` subdirectory
  • Loading branch information
mbg authored Oct 11, 2023
2 parents a4eb3fd + 7d7d90e commit 7a98afe
Show file tree
Hide file tree
Showing 88 changed files with 14 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ updates:
update-types: ['version-update:semver-patch', 'version-update:semver-minor']

- package-ecosystem: "gomod"
directory: "go"
directory: "go/extractor"
schedule:
interval: "daily"
allow:
- dependency-name: "golang.org/x/mod"
- dependency-name: "golang.org/x/tools"
reviewers:
- "github/codeql-go"
8 changes: 4 additions & 4 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tools: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))) tools/tokenizer.j

.PHONY: $(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES)))
$(addsuffix $(EXE),$(addprefix tools/bin/,$(BINARIES))):
go build -mod=vendor -o $@ ./extractor/cli/$(basename $(@F))
go build -C extractor -mod=vendor -o ../$@ ./cli/$(basename $(@F))

tools-codeql: tools-$(CODEQL_PLATFORM)

Expand All @@ -61,19 +61,19 @@ tools-linux64: $(addprefix tools/linux64/,$(BINARIES))

.PHONY: $(addprefix tools/linux64/,$(BINARIES))
$(addprefix tools/linux64/,$(BINARIES)):
GOOS=linux GOARCH=amd64 go build -mod=vendor -o $@ ./extractor/cli/$(@F)
GOOS=linux GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(@F)

tools-osx64: $(addprefix tools/osx64/,$(BINARIES))

.PHONY: $(addprefix tools/osx64/,$(BINARIES))
$(addprefix tools/osx64/,$(BINARIES)):
GOOS=darwin GOARCH=amd64 go build -mod=vendor -o $@ ./extractor/cli/$(@F)
GOOS=darwin GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(@F)

tools-win64: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES)))

.PHONY: $(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES)))
$(addsuffix .exe,$(addprefix tools/win64/,$(BINARIES))):
env GOOS=windows GOARCH=amd64 go build -mod=vendor -o $@ ./extractor/cli/$(basename $(@F))
env GOOS=windows GOARCH=amd64 go build -C extractor -mod=vendor -o ../$@ ./cli/$(basename $(@F))

.PHONY: extractor-common extractor extractor-full
extractor-common: codeql-extractor.yml LICENSE ql/lib/go.dbscheme \
Expand Down
2 changes: 1 addition & 1 deletion go/go.mod → go/extractor/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/github/codeql-go
module github.com/github/codeql-go/extractor

go 1.21

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions go/ql/test/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module github.com/github/codeql-go/ql/test

go 1.21

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
| ../../go.mod:0:0:0:0 | ../../go.mod | |
| util.go:0:0:0:0 | util.go | |

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a98afe

Please sign in to comment.