[buildbucket plugin] Add Makefile for buildbucket plugin.

Bug: 1319718
Change-Id: Ie16ea7ea97368d165ea92c504b3345e4df99b210
Reviewed-on: https://chromium-review.googlesource.com/c/infra/gerrit-plugins/buildbucket/+/3606601
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
diff --git a/README.md b/README.md
index 639c03c..40f739f 100644
--- a/README.md
+++ b/README.md
@@ -48,21 +48,22 @@
 
 ## Web Plugin Development
 
+Run the commands below in web/.
+
 For running unit tests execute:
 
-    bazel test --test_output=all //plugins/buildbucket/web:karma_test
+    make test
 
 For checking or fixing eslint formatter problems run:
 
-    bazel test //plugins/buildbucket/web:lint_test
-    bazel run //plugins/buildbucket/web:lint_bin -- --fix "$(pwd)/plugins/buildbucket/web"
+    make lint_test
+    make lint_fix
 
 For testing the plugin with
 [Gerrit FE Dev Helper](https://gerrit.googlesource.com/gerrit-fe-dev-helper/)
-build the JavaScript bundle and copy it to the `plugins/buildbucket` folder:
+the following command builds the JavaScript bundle and copies it to the `plugins/buildbucket` folder:
 
-    bazel build //plugins/buildbucket/web:buildbucket
-    cp -f bazel-bin/plugins/buildbucket/web/buildbucket.js plugins/buildbucket
+    make build
 
 and let the Dev Helper redirect from `.+/plugins/buildbucket/static/buildbucket.js` to
 `http://localhost:8081/plugins_/plugins/buildbucket.js`.
diff --git a/web/Makefile b/web/Makefile
new file mode 100644
index 0000000..216f26d
--- /dev/null
+++ b/web/Makefile
@@ -0,0 +1,20 @@
+# Copyright 2022 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+.PHONY: test
+
+test:
+	bazel test --test_output=all //plugins/buildbucket/web:karma_test
+
+lint_test:
+	bazel test //plugins/buildbucket/web:lint_test
+
+lint_fix:
+	bazel run //plugins/buildbucket/web:lint_bin -- --fix "./"
+
+build:
+	bazel build //plugins/buildbucket/web:buildbucket && \
+	cp -f ~/gerrit/bazel-bin/plugins/buildbucket/web/buildbucket.js ~/gerrit/plugins/buildbucket
+
+