Skip to content

Commit

Permalink
refactor: cleanup unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
mgred committed May 12, 2024
1 parent 2a55f78 commit 5abde8f
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 252 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash

NAME=tools
ALGO=384
TAG=${GITHUB_REF_NAME}
VERSION=$TAG
[[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$ ]] && VERSION=${TAG:1}
PREFIX="tools-$VERSION"
RULES_ARCHIVE="./bzlparty_tools-$TAG.tar.gz"
PREFIX="$NAME-$VERSION"
RULES_ARCHIVE="$NAME-$TAG.tar.gz"

module_file=$(mktemp)
root_build_file=$(mktemp)
Expand Down
64 changes: 0 additions & 64 deletions docs/diff.md

This file was deleted.

69 changes: 0 additions & 69 deletions docs/github.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/goawk.md

This file was deleted.

41 changes: 0 additions & 41 deletions docs/http.md

This file was deleted.

109 changes: 108 additions & 1 deletion docs/lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@




<a id="http_binary"></a>

## http_binary
Expand Down Expand Up @@ -84,6 +83,114 @@ Create a patch file from `source` and `target` files.
| <a id="diff-input"></a>input | Input patch file, optional. Defaults to a file named like the rule with the <code>patch</code> extension, e.g. <code>module_bazel.patch</code>. | <code>None</code> |


<a id="host_platform"></a>

## host_platform

<pre>
host_platform(<a href="#host_platform-ctx">ctx</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="host_platform-ctx"></a>ctx | <p align="center"> - </p> | none |


<a id="is_amd64"></a>

## is_amd64

<pre>
is_amd64(<a href="#is_amd64-platform">platform</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="is_amd64-platform"></a>platform | <p align="center"> - </p> | none |


<a id="is_darwin"></a>

## is_darwin

<pre>
is_darwin(<a href="#is_darwin-platform">platform</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="is_darwin-platform"></a>platform | <p align="center"> - </p> | none |


<a id="is_freebsd"></a>

## is_freebsd

<pre>
is_freebsd(<a href="#is_freebsd-platform">platform</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="is_freebsd-platform"></a>platform | <p align="center"> - </p> | none |


<a id="is_netbsd"></a>

## is_netbsd

<pre>
is_netbsd(<a href="#is_netbsd-platform">platform</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="is_netbsd-platform"></a>platform | <p align="center"> - </p> | none |


<a id="is_windows"></a>

## is_windows

<pre>
is_windows(<a href="#is_windows-platform">platform</a>)
</pre>



**PARAMETERS**


| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="is_windows-platform"></a>platform | <p align="center"> - </p> | none |


<a id="platform_binaries"></a>

## platform_binaries
Expand Down
6 changes: 2 additions & 4 deletions lib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

exports_files(glob([
"*.bzl",
]) + [
"dist.awk",
"platform_binary.awk",
])
"*.awk",
]))

bzl_library(
name = "defs",
Expand Down
24 changes: 23 additions & 1 deletion lib/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,38 @@
# lib
```starlark
load("@bzlparty_tools//lib:defs.bzl", "...")
```
"""

load(":diff.bzl", _diff = "diff")
load(":http.bzl", _http_binary = "http_binary")
load(":jql.bzl", _jql_test = "jql_test")
load(":platform_binary.bzl", _platform_binaries = "platform_binaries", _platform_binary = "platform_binary")
load(
":platform_binary.bzl",
_platform_binaries = "platform_binaries",
_platform_binary = "platform_binary",
)
load(
":platforms.bzl",
_host_platform = "host_platform",
_is_amd64 = "is_amd64",
_is_darwin = "is_darwin",
_is_freebsd = "is_freebsd",
_is_netbsd = "is_netbsd",
_is_windows = "is_windows",
)

diff = _diff
http_binary = _http_binary
jql_test = _jql_test
platform_binary = _platform_binary
platform_binaries = _platform_binaries
host_platform = _host_platform
is_amd64 = _is_amd64
is_darwin = _is_darwin
is_freebsd = _is_freebsd
is_netbsd = _is_netbsd
is_windows = _is_windows
Loading

0 comments on commit 5abde8f

Please sign in to comment.