Add version number to a dedicated bzl file

Adding the version number to defs.bzl caused some problems in our internal codebase.
This commit is contained in:
fweikert 2019-10-02 15:25:05 +02:00
parent eae134361b
commit 182a477244
3 changed files with 18 additions and 3 deletions

View File

@ -19,8 +19,6 @@ load("@rules_cc//cc/private/rules_impl:compiler_flag.bzl", _compiler_flag = "com
_MIGRATION_TAG = "__CC_RULES_MIGRATION_DO_NOT_USE_WILL_BREAK__"
version = "0.0.1"
def _add_tags(attrs):
if "tags" in attrs and attrs["tags"] != None:
attrs["tags"] += [_MIGRATION_TAG]

17
cc/version.bzl Normal file
View File

@ -0,0 +1,17 @@
# 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.
"""Information about the present version of rules_cc."""
version = "0.0.1"

View File

@ -2,7 +2,7 @@ package(
default_visibility = ["//visibility:private"],
)
load("@rules_cc//cc:defs.bzl", "version")
load("@rules_cc//cc:version.bzl", "version")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_pkg//releasing:defs.bzl", "print_rel_notes")