Skip to content

Commit 21f1f48

Browse files
committed
remove some scripts that no longer work
1 parent 280dfcf commit 21f1f48

File tree

4 files changed

+16
-234
lines changed

4 files changed

+16
-234
lines changed

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ Scripts that make local Metabase development handier. Currently these only consi
22
databases we support like MySQL or Spark SQL locally, but we can add scripts for other stuff in the future if we think
33
of anything good.
44

5-
Please feel free to collaborate and improve these scripts or add new ones!
6-
75
### bb tasks
86

97
To get setup you'll need:
@@ -15,14 +13,9 @@ To see a list of avaliable tasks, run:
1513

1614
bb tasks
1715

18-
#### setup for `run-branch`
19-
20-
You'll need two environment variables set to use `bb run-branch`.
16+
#### Setup MB_DIR
2117

2218
MB_DIR=/path/to/metabase
23-
GH_TOKEN=ghp_asdasdasdasdasdasdasdasdasd
24-
25-
`GH_TOKEN` needs to be a classic can be obtained from: [https://github.com/settings/tokens](https://github.com/settings/tokens). Be sure to tick the *repo* permission.
2619

2720
#### How to get help
2821

bb.edn

+15-40
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,6 @@
99
[bb.tasks :as t]
1010
[clojure.string :as str]]
1111

12-
run-branch
13-
{:requires [[bb.dl-and-run :as dl]]
14-
:doc "Download and run a jar for a branch, on a port. Respects MB_DB_CONNECTION_URI."
15-
:examples [["bb run-branch --branch master --port 4445" "Run master branch on port 4445"]
16-
["bb run-branch" "Pick branch and port, and run branch on port"]
17-
["bb run-branch -p 9939 -s 9938" "Pick a branch, and run it on port 4445 with a socket repl on 9938"]]
18-
:task
19-
(do (dl/check-gh-token!)
20-
(dl/download-and-run-latest-jar!
21-
(let [list-branches (delay ;; choices can be a delay -- we dont want to grab theese unless we need them.
22-
(t/list-branches
23-
(t/env "MB_DIR" (fn []
24-
(println (c/red "Please put the path of your metabase repository into the MB_DIR env variable like so:"))
25-
(println (c/white "export MB_DIR=path/to/metabase"))
26-
(System/exit 1)))))]
27-
(cli/menu! (current-task)
28-
{:id :branch :msg "What branch should we run?" :short "-b" :long "--branch BRANCH" :choices list-branches :choices-doc "list of branches" :prompt :select}
29-
{:id :port :msg "What port should we run it on?" :short "-p" :long "--port PORT" :prompt :number :default 3337}
30-
{:id :socket-repl :msg "What port shall we open a socket repl on?" :short "-s" :long "--socket-repl SOCKETPORT"}))))}
31-
3212
metabuild
3313
{:doc "Starts metabase locally in dev mode. Set FORCE_MB_DB_CONNECTION_URI to override connection string building"
3414
:requires [[bb.meta :as meta]]
@@ -68,26 +48,21 @@
6848
:choices-doc "a list of clojure test namespaces"})))}
6949

7050
watch-ci
71-
{:requires [[bb.dl-and-run :as dl]
72-
[bb.watch-ci :as watch-ci]]
73-
:doc "Watch the CI status for a branch until it passes."
74-
:examples [["bb watch-ci --branch current" "Check currently checked out branch in MB_DIR repo"]]
75-
:task
76-
(do (dl/check-gh-token!)
77-
(let [{:keys [branch]} (cli/menu! (current-task)
78-
{:id :branch
79-
:msg "What branch should we check?"
80-
:short "-b"
81-
:long "--branch BRANCH"
82-
:choices (delay (t/list-branches (t/mb-dir)))
83-
:choices-doc "list of branches"
84-
:prompt :select})
85-
branch (if (= "current" branch)
86-
(let [current (t/current-branch)]
87-
(do (println (c/green (c/bold "Using current branch: " (t/current-branch))))
88-
current))
89-
branch)]
90-
(watch-ci/branch branch)))}
51+
{:doc "Prints the command to watch your CI build for a specific branch."
52+
:task (println
53+
(str/join "\n" ["To watch your branch, cd to metabase, switch to your branch, and run:"
54+
""
55+
"gh pr checks --watch --required && say done"
56+
""]))}
57+
58+
github-bookmarklet
59+
{:doc "Print info about Tim's Amazing Github Bookmarklet."
60+
:task (println
61+
(str/join "\n"
62+
["Save this as a bookmarklet, and click it on a github page to remove passing tests:"
63+
""
64+
"javascript:%20document.querySelectorAll(%22.merge-status-item%20.octicon-check,.octicon-skip%22).forEach((el)%20=%3E%20el.parentElement.parentElement.remove())"
65+
""]))}
9166

9267
install-autotab {:doc "Prints shell code to autocomplete tasks using bb.
9368
Note: for fish shell please make sure ~/.config/fish/completions exists."

bb/dl_and_run.clj

-142
This file was deleted.

bb/watch_ci.clj

-44
This file was deleted.

0 commit comments

Comments
 (0)