mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Bazel: format
This commit is contained in:
@@ -274,11 +274,11 @@ ripunzip_archive = use_repo_rule("//misc/ripunzip:ripunzip.bzl", "ripunzip_archi
|
|||||||
# go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s
|
# go to https://github.com/GoogleChrome/ripunzip/releases to find latest version and corresponding sha256s
|
||||||
ripunzip_archive(
|
ripunzip_archive(
|
||||||
name = "ripunzip",
|
name = "ripunzip",
|
||||||
version = "2.0.3",
|
|
||||||
sha256_linux = "ee0e8a957687a5dc3a66b2a4b25883bf762df4c9c07f0651af527a32a405054b",
|
sha256_linux = "ee0e8a957687a5dc3a66b2a4b25883bf762df4c9c07f0651af527a32a405054b",
|
||||||
sha256_windows = "66d0c1375301bf5ab815348048f43b110631d3fa7200acd50d50a8ed8655ca62",
|
|
||||||
sha256_macos_intel = "4457a18bfcc5feabe09f5ea3d1157128e07b4873392cb404a870e611924abf64",
|
|
||||||
sha256_macos_arm = "8a88eea54eac232d162a72a42065e0429b82dbf4f05e9642915dff9d7a81f846",
|
sha256_macos_arm = "8a88eea54eac232d162a72a42065e0429b82dbf4f05e9642915dff9d7a81f846",
|
||||||
|
sha256_macos_intel = "4457a18bfcc5feabe09f5ea3d1157128e07b4873392cb404a870e611924abf64",
|
||||||
|
sha256_windows = "66d0c1375301bf5ab815348048f43b110631d3fa7200acd50d50a8ed8655ca62",
|
||||||
|
version = "2.0.3",
|
||||||
)
|
)
|
||||||
|
|
||||||
register_toolchains(
|
register_toolchains(
|
||||||
|
|||||||
@@ -4,21 +4,21 @@ def _impl(repository_ctx):
|
|||||||
build_file = Label("//misc/ripunzip:BUILD.ripunzip.bazel")
|
build_file = Label("//misc/ripunzip:BUILD.ripunzip.bazel")
|
||||||
if repository_ctx.os.name == "linux":
|
if repository_ctx.os.name == "linux":
|
||||||
repository_ctx.download_and_extract(
|
repository_ctx.download_and_extract(
|
||||||
url="%s/ripunzip_%s-1_amd64.deb" % (url_prefix, version),
|
url = "%s/ripunzip_%s-1_amd64.deb" % (url_prefix, version),
|
||||||
sha256=repository_ctx.attr.sha256_linux,
|
sha256 = repository_ctx.attr.sha256_linux,
|
||||||
canonical_id="ripunzip-linux",
|
canonical_id = "ripunzip-linux",
|
||||||
output="deb",
|
output = "deb",
|
||||||
)
|
)
|
||||||
repository_ctx.extract(
|
repository_ctx.extract(
|
||||||
"deb/data.tar.xz",
|
"deb/data.tar.xz",
|
||||||
strip_prefix="usr",
|
strip_prefix = "usr",
|
||||||
)
|
)
|
||||||
elif repository_ctx.os.name == "windows":
|
elif repository_ctx.os.name == "windows":
|
||||||
repository_ctx.download_and_extract(
|
repository_ctx.download_and_extract(
|
||||||
url="%s/ripunzip_v%s-x86_64-pc-windows-msvc.zip" % (url_prefix, version),
|
url = "%s/ripunzip_v%s-x86_64-pc-windows-msvc.zip" % (url_prefix, version),
|
||||||
canonical_id="ripunzip-windows",
|
canonical_id = "ripunzip-windows",
|
||||||
sha256=repository_ctx.attr.sha256_windows,
|
sha256 = repository_ctx.attr.sha256_windows,
|
||||||
output="bin",
|
output = "bin",
|
||||||
)
|
)
|
||||||
elif repository_ctx.os.name == "mac os x":
|
elif repository_ctx.os.name == "mac os x":
|
||||||
arch = repository_ctx.os.arch
|
arch = repository_ctx.os.arch
|
||||||
@@ -33,10 +33,10 @@ def _impl(repository_ctx):
|
|||||||
else:
|
else:
|
||||||
fail("Unsupported macOS architecture: %s" % arch)
|
fail("Unsupported macOS architecture: %s" % arch)
|
||||||
repository_ctx.download_and_extract(
|
repository_ctx.download_and_extract(
|
||||||
url="%s/ripunzip_v%s-%s.tar.gz" % (url_prefix, version, suffix),
|
url = "%s/ripunzip_v%s-%s.tar.gz" % (url_prefix, version, suffix),
|
||||||
sha256=sha256,
|
sha256 = sha256,
|
||||||
canonical_id=canonical_id,
|
canonical_id = canonical_id,
|
||||||
output="bin",
|
output = "bin",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
fail("Unsupported OS: %s" % repository_ctx.os.name)
|
fail("Unsupported OS: %s" % repository_ctx.os.name)
|
||||||
@@ -44,12 +44,12 @@ def _impl(repository_ctx):
|
|||||||
repository_ctx.symlink(build_file, "BUILD.bazel")
|
repository_ctx.symlink(build_file, "BUILD.bazel")
|
||||||
|
|
||||||
ripunzip_archive = repository_rule(
|
ripunzip_archive = repository_rule(
|
||||||
implementation=_impl,
|
implementation = _impl,
|
||||||
attrs={
|
attrs = {
|
||||||
"version": attr.string(mandatory=True),
|
"version": attr.string(mandatory = True),
|
||||||
"sha256_linux": attr.string(mandatory=True),
|
"sha256_linux": attr.string(mandatory = True),
|
||||||
"sha256_windows": attr.string(mandatory=True),
|
"sha256_windows": attr.string(mandatory = True),
|
||||||
"sha256_macos_intel": attr.string(mandatory=True),
|
"sha256_macos_intel": attr.string(mandatory = True),
|
||||||
"sha256_macos_arm": attr.string(mandatory=True),
|
"sha256_macos_arm": attr.string(mandatory = True),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user