Skip to content

Commit

Permalink
Clarify what folder to run Readme sync from (pantsbuild#16542)
Browse files Browse the repository at this point in the history
Also remove Apple Silicon code from our release script, now that we build those wheels in CI.

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano authored Aug 16, 2022
1 parent 645b1ac commit 3eba81e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 53 deletions.
46 changes: 0 additions & 46 deletions build-support/bin/_release_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,49 +903,6 @@ def publish() -> None:
prompt_to_generate_docs()


def publish_apple_silicon() -> None:
banner("Building and publishing an Apple Silicon wheel")
if os.environ.get("USE_PY39") != "true":
die("Must set `USE_PY39=true` when building for Apple Silicon.")
if os.environ.get("MODE") == "debug":
die("Must build Rust in release mode, not debug. Please run `unset MODE`.")
check_clean_git_branch()
check_pgp()
check_roles()

dest_dir = CONSTANTS.deploy_pants_wheel_dir / CONSTANTS.pants_stable_version
if dest_dir.exists():
shutil.rmtree(dest_dir)
subprocess.run(
[
"./pants",
"--concurrent",
f"--pants-distdir={dest_dir}",
"package",
PANTS_PKG.target,
],
check=True,
)
expected_whl = (
dest_dir
/ f"pantsbuild.pants-{CONSTANTS.pants_stable_version}-cp39-cp39-macosx_11_0_arm64.whl"
)
if not expected_whl.exists():
die(
softwrap(
f"""
Failed to find {expected_whl}. Are you running from the correct platform and
macOS version?
"""
)
)

create_twine_venv()
subprocess.run([CONSTANTS.twine_venv_dir / "bin/twine", "check", expected_whl], check=True)
upload_wheels_via_twine()
banner("Successfully released Apple Silicon wheel to PyPI")


def check_clean_git_branch() -> None:
banner("Checking for a clean Git branch")
git_status = (
Expand Down Expand Up @@ -1251,7 +1208,6 @@ def create_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest="command", required=True)
subparsers.add_parser("publish")
subparsers.add_parser("publish-apple-silicon")
subparsers.add_parser("test-release")
subparsers.add_parser("build-wheels")
subparsers.add_parser("build-fs-util")
Expand All @@ -1268,8 +1224,6 @@ def main() -> None:
args = create_parser().parse_args()
if args.command == "publish":
publish()
if args.command == "publish-apple-silicon":
publish_apple_silicon()
if args.command == "test-release":
test_release()
if args.command == "build-wheels":
Expand Down
11 changes: 4 additions & 7 deletions docs/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ npx rdme login --project pants --2fa

(the `--2fa` flag makes `rdme` prompt for 2fa codes, which is necessary if you have TOTP 2fa set up on your account)


## When cutting a new release branch

Create a fork of the most recent docs branch, and mark it as `beta`, for example:
Expand All @@ -49,16 +48,14 @@ Create a fork of the most recent docs branch, and mark it as `beta`, for example
npx rdme versions:create --version=v2.98 --fork="v2.97" --main=false --beta=true --isPublic=true
```

will create a new docs version, `2.98` based on a copy of the docs from version `2.97`.

will create a new docs version, `2.98` based on a copy of the docs from version `2.97`.

## Sync docs changes up to `readme.com`

Docs markdown files are stored in the `markdown` directory. `rdme` does not do bidirectional sync, so any changes made on readme.com itself _will be deleted_.
Docs markdown files are stored in the `markdown` directory. `rdme` does not do bidirectional sync, so any changes made on readme.com itself _will be deleted_. Make sure you apply any changes from readme.com locally before syncing up.

Make sure you apply any changes from readme.com locally before syncing up.
From the root of the repository:

```
npx rdme docs markdown --version v2.98
npx rdme docs docs/markdown --version v2.98
```

0 comments on commit 3eba81e

Please sign in to comment.