Skip to content

Commit

Permalink
Revert logic related to release remote files (#46)
Browse files Browse the repository at this point in the history
* Revert logic related to release remote files

* Fix
  • Loading branch information
tiagovtristao authored Mar 3, 2022
1 parent 2638220 commit 14ee72e
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 114 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: ./pleasew test //test/release_remote_files:please_pex_remote_hashes
- name: Build
run: ./pleasew build //package:release_files
- name: Release
Expand Down
3 changes: 1 addition & 2 deletions .plzconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ DefaultValue = python3

[PluginConfig "pex_tool"]
ConfigKey = PexTool
; Release artifact of //tools/please_pex:pex_main.
DefaultValue = //tools:please_pex
DefaultValue = //tools/please_pex:pex_main

[PluginConfig "interpreter_options"]
ConfigKey = InterpreterOptions
Expand Down
3 changes: 2 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
subinclude("//build_defs:version")

version(name = "version")

filegroup(
name = "pleasew",
srcs = ["pleasew"],
Expand All @@ -8,5 +10,4 @@ filegroup(
visibility = ["PUBLIC"],
)

version(name = "version")

7 changes: 0 additions & 7 deletions build_defs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,3 @@ filegroup(
srcs = ["multiversion_wheel.build_defs"],
visibility = ["//third_party/..."],
)

filegroup(
name = "release_file",
srcs = ["release_file.build_defs"],
visibility = ["//package/..."],
)

11 changes: 0 additions & 11 deletions build_defs/release_file.build_defs

This file was deleted.

20 changes: 13 additions & 7 deletions package/BUILD
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
export_file(
name = "files",
src = "files.build_defs",
visibility = ["PUBLIC"],
)
subinclude("//:version", "//build_defs:archs")

release_files = {
"please_pex": "//tools/please_pex:pex_main",
}

subinclude(":files", "//build_defs:release_file", "//build_defs:archs")
def release_file(name:str, file_target:str, arch:str):
return genrule(
name = f"{name}_{arch}",
srcs = [f"///{arch}" + canonicalise(file_target)],
outs = [f"{name}-{VERSION}-{arch}"],
cmd = "mv $SRC $OUT",
)

filegroup(
name = "release_files",
srcs = [
release_file(name, target, arch)
for name, target in RELEASE_FILES.items()
for name, target in release_files.items()
for arch in SUPPORTED_ARCHS
],
labels = ["hlink:plz-out/package"],
Expand Down
4 changes: 0 additions & 4 deletions package/files.build_defs

This file was deleted.

5 changes: 0 additions & 5 deletions test/build_defs/BUILD

This file was deleted.

47 changes: 0 additions & 47 deletions test/build_defs/release_remote_file.build_defs

This file was deleted.

8 changes: 0 additions & 8 deletions test/release_remote_files/BUILD

This file was deleted.

19 changes: 0 additions & 19 deletions tools/BUILD
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
subinclude("//:version")

# This target is meant to be used as the default pex tool for this plugin. It relies on the released artifact which might
# not exist yet and as such, the hash sums won't be available too. To solve this a test will be run to guarantee that the
# hashes below will match the ones of the artifact once released.
remote_file(
name = "please_pex",
url = f"https://github.com/please-build/python-rules/releases/download/v{VERSION}/please_pex-{VERSION}-{CONFIG.HOSTOS}_{CONFIG.HOSTARCH}",
hashes = [
"28abdae0d17ca666663563f9b874ddfae0c5209389271d933945003c0ce9d6ab",
"3c621e8ff11301b64c7a0ca84ba23161fd5c777e4df82034060925f5106ee317",
"917e6ff3591f6bca5cfc2a251f136c180d743856bee877dc18626cc135bbe7a0",
"9c20d867ec1a1fcea85481d4a29ec80f8af5923fc06c7ad0057105918ec3e236",
"ab3426a82ab4cb5c5b0a4979a4a3821eb10361726759e30ab5f2a1e7c09fc78e",
],
binary = True,
visibility = ["PUBLIC"],
)

remote_file(
name = "arcat",
url = f"https://github.com/please-build/arcat/releases/download/v1.0.0/arcat-1.0.0-{CONFIG.HOSTOS}_{CONFIG.HOSTARCH}",
Expand Down
2 changes: 1 addition & 1 deletion tools/please_pex/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go_binary(
"//third_party/go:go-logging.v1",
"//tools/please_pex/pex",
],
visibility = ["//package/..."],
visibility = ["PUBLIC"],
)

python_test(
Expand Down

0 comments on commit 14ee72e

Please sign in to comment.