Skip to content

Commit 6eb935f

Browse files
feat: bzlmodify
1 parent 1f556ec commit 6eb935f

File tree

5 files changed

+99
-11
lines changed

5 files changed

+99
-11
lines changed

.bcr/metadata.template.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"maintainers": [
3+
{
4+
"github": "1e100"
5+
}
6+
],
7+
"repository": [
8+
"github:1e100/cloud_archive"
9+
],
10+
"versions": [],
11+
"yanked_versions": {}
12+
}

.bcr/presubmit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
matrix:
2+
platform:
3+
- ubuntu2404
4+
- macos
5+
tasks:
6+
verify_targets:
7+
name: Verify basic build targets
8+
platform: ${{ platform }}
9+
build_targets:
10+
- '@cloud_archive//...'

.bcr/source.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "",
3+
"strip_prefix": "{REPO}-{TAG}",
4+
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.zip"
5+
}

.gitignore

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,2 @@
1-
bazel-*
2-
*.dSYM
3-
**/*.pyc
4-
**/*.swp
5-
.ipynb_checkpoints/
6-
__pycache__
7-
*~
8-
.bazelrc
9-
xcuserdata/
10-
.idea
11-
1+
# thrash happens; let it happen for now
2+
MODULE.bazel.lock

MODULE.bazel

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
module(name = "cloud_archive")
2+
3+
s3_archive = use_repo_rule("//:cloud_archive.bzl", "s3_archive")
4+
5+
s3_archive(
6+
name = "archive_s3",
7+
bucket = "1e100-temp",
8+
build_file = "//:BUILD.archive",
9+
file_path = "cloud_archive_test.zip",
10+
sha256 = "d0ff6239646b3a60e4d8926402281311e003ae03183b1ae24f2adba5d9289f04",
11+
strip_prefix = "cloud_archive_test",
12+
)
13+
14+
minio_archive = use_repo_rule("//:cloud_archive.bzl", "minio_archive")
15+
16+
minio_archive(
17+
name = "archive_minio_gz",
18+
build_file = "//:BUILD.archive",
19+
file_path = "minio/temp/cloud_archive_test.tar.gz",
20+
sha256 = "bf4dd5304180561a745e816ee6a8db974a3fcf5b9d706a493776d77202c48bc9",
21+
strip_prefix = "cloud_archive_test",
22+
)
23+
24+
minio_archive(
25+
name = "archive_minio_zstd",
26+
build_file = "//:BUILD.archive",
27+
file_path = "minio/temp/cloud_archive_test.tar.zst",
28+
sha256 = "1891c85349f519206a2a2aa21f4927146b8cf84db04d3be91e0b54ce564d8b73",
29+
strip_prefix = "dir1",
30+
)
31+
32+
gs_archive = use_repo_rule("//:cloud_archive.bzl", "gs_archive")
33+
34+
gs_archive(
35+
name = "archive_gcloud_gz",
36+
bucket = "depthwise-temp",
37+
build_file = "//:BUILD.archive",
38+
file_path = "cloud_archive_test.tar.gz",
39+
sha256 = "bf4dd5304180561a745e816ee6a8db974a3fcf5b9d706a493776d77202c48bc9",
40+
strip_prefix = "cloud_archive_test",
41+
)
42+
43+
gs_archive(
44+
name = "archive_gcloud_zstd",
45+
bucket = "depthwise-temp",
46+
build_file = "//:BUILD.archive",
47+
file_path = "cloud_archive_test.tar.zst",
48+
sha256 = "1891c85349f519206a2a2aa21f4927146b8cf84db04d3be91e0b54ce564d8b73",
49+
strip_prefix = "dir1",
50+
)
51+
52+
gs_archive(
53+
name = "archive_gcloud_zstd_strip2",
54+
bucket = "depthwise-temp",
55+
build_file = "//:BUILD.archive",
56+
file_path = "cloud_archive_test.tar.zst",
57+
sha256 = "1891c85349f519206a2a2aa21f4927146b8cf84db04d3be91e0b54ce564d8b73",
58+
strip_prefix = "dir1/dir2",
59+
)
60+
61+
gs_archive(
62+
name = "archive_gcloud_zstd_patch",
63+
bucket = "depthwise-temp",
64+
build_file = "//:BUILD.archive",
65+
file_path = "cloud_archive_test.tar.zst",
66+
patch_args = ["-p1"],
67+
patches = ["//:test.patch"],
68+
sha256 = "1891c85349f519206a2a2aa21f4927146b8cf84db04d3be91e0b54ce564d8b73",
69+
strip_prefix = "dir1",
70+
)

0 commit comments

Comments
 (0)