From ed2907a01979ce837000308fb47069574301cfb8 Mon Sep 17 00:00:00 2001 From: aiuto Date: Mon, 30 Sep 2019 09:11:23 -0400 Subject: [PATCH] add rules to package releases (#70) --- BUILD | 19 +++++++++---------- WORKSPACE | 7 ++++++- setup/BUILD | 6 ++++++ version.bzl | 16 ++++++++++++++++ 4 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 version.bzl diff --git a/BUILD b/BUILD index e3401b7..c49c51d 100644 --- a/BUILD +++ b/BUILD @@ -1,11 +1,10 @@ -load("@bazel_gazelle//:def.bzl", "gazelle") -load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") - -# gazelle:prefix github.com/example/project -gazelle( - name = "gazelle", -) - -buildifier( - name = "buildifier", +filegroup( + name = "standard_package", + srcs = glob([ + "BUILD", + "LICENSE", + "*.bzl", + "third_party/**", + ]), + visibility = ["@//distro:__pkg__"], ) diff --git a/WORKSPACE b/WORKSPACE index 27d243a..61f4834 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1 +1,6 @@ -# Empty workspace since all examples should live in their own directory +workspace(name = "bazel_federation") + +load("@bazel_federation//:repositories.bzl", "rules_pkg") +rules_pkg() +load("@bazel_federation//setup:rules_pkg.bzl", "rules_pkg_setup") +rules_pkg_setup() diff --git a/setup/BUILD b/setup/BUILD index ab5a358..b57ca45 100644 --- a/setup/BUILD +++ b/setup/BUILD @@ -1 +1,7 @@ exports_files(glob(["*.bzl"])) + +filegroup( + name = "standard_package", + srcs = glob(["BUILD", "*.bzl"]), + visibility = ["@//distro:__pkg__"], +) diff --git a/version.bzl b/version.bzl new file mode 100644 index 0000000..8bfa42d --- /dev/null +++ b/version.bzl @@ -0,0 +1,16 @@ +# Copyright 2019 The Bazel Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""The version of bazel_federation.""" + +version = "0.0.1"