Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/go-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ jobs:
issues: write
steps:
- uses: actions/checkout@v3
- uses: bazelbuild/setup-bazelisk@v2
- uses: actions/setup-go@v4
with:
go-version: '>=1.18.0'
- run: go mod tidy
- name: Setup Bazel
run: bazel version || npm install -g @bazel/bazelisk
- name: Update
run: scripts/update-go-deps.sh
- uses: UnicornGlobal/has-changes-action@v1.0.12
id: has-changes
- uses: dacbd/create-issue-action@v1
Expand All @@ -36,6 +35,5 @@ jobs:
To update, run

```
go mod tidy
bazel //:gazelle-update-repos
scripts/update-go-deps.sh
```
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ go_register_toolchains(
)

# Gazelle dependency management support
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

# Pull in external dependencies:
# gazelle:repository_macro go_deps.bzl%go_dependencies
Expand Down
11 changes: 7 additions & 4 deletions go/agentport/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ go_library(
srcs = ["io.go"],
importpath = "github.com/google/chrome-ssh-agent/go/agentport",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
"@com_github_norunners_vert//:vert",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
"@com_github_norunners_vert//:vert",
],
"//conditions:default": [],
}),
)
9 changes: 6 additions & 3 deletions go/app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ go_library(
],
importpath = "github.com/google/chrome-ssh-agent/go/app",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
19 changes: 11 additions & 8 deletions go/background/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ go_library(
srcs = ["main.go"],
importpath = "github.com/google/chrome-ssh-agent/go/background",
visibility = ["//visibility:private"],
deps = [
"//go/agentport",
"//go/app",
"//go/jsutil",
"//go/keys",
"//go/storage",
"@org_golang_x_crypto//ssh/agent",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/agentport",
"//go/app",
"//go/jsutil",
"//go/keys",
"//go/storage",
"@org_golang_x_crypto//ssh/agent",
],
"//conditions:default": [],
}),
)

go_wasm_binary(
Expand Down
7 changes: 6 additions & 1 deletion go/dom/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ go_library(
],
importpath = "github.com/google/chrome-ssh-agent/go/dom",
visibility = ["//visibility:public"],
deps = ["//go/jsutil"],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
7 changes: 6 additions & 1 deletion go/dom/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ go_library(
srcs = ["testing.go"],
importpath = "github.com/google/chrome-ssh-agent/go/dom/testing",
visibility = ["//visibility:public"],
deps = ["//go/jsutil"],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)
9 changes: 6 additions & 3 deletions go/jsutil/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ go_library(
srcs = ["promise.go"],
importpath = "github.com/google/chrome-ssh-agent/go/jsutil/testing",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)
21 changes: 12 additions & 9 deletions go/keys/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ go_library(
],
importpath = "github.com/google/chrome-ssh-agent/go/keys",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
"//go/message",
"//go/storage",
"@com_github_norunners_vert//:vert",
"@com_github_youmark_pkcs8//:pkcs8",
"@org_golang_x_crypto//ssh",
"@org_golang_x_crypto//ssh/agent",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
"//go/message",
"//go/storage",
"@com_github_norunners_vert//:vert",
"@com_github_youmark_pkcs8//:pkcs8",
"@org_golang_x_crypto//ssh",
"@org_golang_x_crypto//ssh/agent",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
7 changes: 6 additions & 1 deletion go/lock/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ go_library(
srcs = ["lock.go"],
importpath = "github.com/google/chrome-ssh-agent/go/lock",
visibility = ["//visibility:public"],
deps = ["//go/jsutil"],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
7 changes: 6 additions & 1 deletion go/message/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ go_library(
srcs = ["sender.go"],
importpath = "github.com/google/chrome-ssh-agent/go/message",
visibility = ["//visibility:public"],
deps = ["//go/jsutil"],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)
9 changes: 6 additions & 3 deletions go/message/fakes/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ go_library(
srcs = ["hub.go"],
importpath = "github.com/google/chrome-ssh-agent/go/message/fakes",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
21 changes: 12 additions & 9 deletions go/options/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ go_library(
srcs = ["main.go"],
importpath = "github.com/google/chrome-ssh-agent/go/options",
visibility = ["//visibility:private"],
deps = [
"//go/app",
"//go/dom",
"//go/jsutil",
"//go/keys",
"//go/message",
"//go/optionsui",
"//go/testing",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/app",
"//go/dom",
"//go/jsutil",
"//go/keys",
"//go/message",
"//go/optionsui",
"//go/testing",
],
"//conditions:default": [],
}),
)

go_wasm_binary(
Expand Down
17 changes: 10 additions & 7 deletions go/optionsui/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ go_library(
srcs = ["ui.go"],
importpath = "github.com/google/chrome-ssh-agent/go/optionsui",
visibility = ["//visibility:public"],
deps = [
"//go/dom",
"//go/jsutil",
"//go/keys",
"//go/keys/testdata",
"@com_github_google_go_cmp//cmp",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/dom",
"//go/jsutil",
"//go/keys",
"//go/keys/testdata",
"@com_github_google_go_cmp//cmp",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
13 changes: 8 additions & 5 deletions go/storage/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ go_library(
],
importpath = "github.com/google/chrome-ssh-agent/go/storage",
visibility = ["//visibility:public"],
deps = [
"//go/jsutil",
"//go/lock",
"@com_github_norunners_vert//:vert",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/jsutil",
"//go/lock",
"@com_github_norunners_vert//:vert",
],
"//conditions:default": [],
}),
)

go_wasm_test(
Expand Down
9 changes: 6 additions & 3 deletions go/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ go_library(
srcs = ["e2eresults.go"],
importpath = "github.com/google/chrome-ssh-agent/go/testing",
visibility = ["//visibility:public"],
deps = [
"//go/dom",
],
deps = select({
"@io_bazel_rules_go//go/platform:js": [
"//go/dom",
],
"//conditions:default": [],
}),
)
6 changes: 3 additions & 3 deletions html/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ ts_config(
ts_project(
name = "app",
srcs = ["app.ts"],
tsconfig = ":tsconfig",
declaration = True,
tsconfig = ":tsconfig",
deps = [
":wasm_exec",
"//:node_modules/@types/chrome",
Expand All @@ -39,8 +39,8 @@ ts_project(
ts_project(
name = "background",
srcs = ["background.ts"],
tsconfig = ":tsconfig",
declaration = True,
tsconfig = ":tsconfig",
deps = [
":app",
"//:node_modules/@types/chrome",
Expand All @@ -57,8 +57,8 @@ esbuild(
ts_project(
name = "options",
srcs = ["options.ts"],
tsconfig = ":tsconfig",
declaration = True,
tsconfig = ":tsconfig",
deps = [
":app",
"//:node_modules/@types/chrome",
Expand Down
5 changes: 5 additions & 0 deletions scripts/update-go-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -eu

bazel run @go_sdk//:bin/go -- get -u ./...
bazel run @go_sdk//:bin/go -- mod tidy
bazel run //:gazelle-update-repos