Newer
Older
> A Bazel ruleset for performing operations with cURL, hermetically.
## Getting Started
Add the following to `MODULE.bazel`:
```py
bazel_dep(module_name = "rules_curl", version = "0.0.0")
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
## Providers
### ManifestInfo
Encapsulates the file to upload and its URL template (see [ManifestInfo][manifest_info])
Members:
- **file**: File
- **url**: string
### ManifestsInfo
The dependency set of `ManifestInfo`s
Members:
- **manifests**: depset of `ManifestInfo`s
## Usage
### curl_upload_file
```py
load("@rules_curl//curl/upload/file:defs.bzl", "curl_upload_file")
curl_upload_file(
name = "upload",
src = ":fixture.txt",
dst = "directory/fixture.txt",
url = "https://test.case",
)
```
### curl_upload_manifests
```py
load("@rules_curl//curl/upload/manifests:defs.bzl", "curl_upload_manifests")
curl_upload_manifests(
name = "upload",
srcs = [
":fixture_1",
":fixture_2",
],
url = "https://test.case",
)
```
> Note: `fixture_1` and `fixture_2` have to provide either `ManifestInfo` or `ManifestsInfo`
[manifest_info]: curl/upload/ManifestInfo.bzl