Skip to content

Fix for macOS: tar: Option --to-command=... is not supported #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ env:
jobs:
tests:
name: "Tests"
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.x
python-version: 3.12
cache: pip
cache-dependency-path: dev-requirements.txt
- run: |
Expand Down
20 changes: 9 additions & 11 deletions run_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import shutil
import subprocess
import sys
import tempfile
import time
import urllib.request
from pathlib import Path
Expand Down Expand Up @@ -570,17 +571,14 @@ def check_doc_unreleased_version(db: ReleaseShelf) -> None:
if release_tag.includes_docs:
assert archive_path.exists()
if archive_path.exists():
proc = subprocess.run(
[
"tar",
"-xjf",
archive_path,
'--to-command=! grep -Hn --label="$TAR_FILENAME" "[(]unreleased[)]"',
],
)
if proc.returncode != 0:
if not ask_question("Are these `(unreleased)` strings in built docs OK?"):
raise AssertionError("`(unreleased)` strings found in docs")
with tempfile.TemporaryDirectory() as temp_dir:
subprocess.run(["tar", "-xjf", archive_path, "-C", temp_dir])
proc = subprocess.run(["grep", "-rHn", "[(]unreleased[)]", temp_dir])
if proc.returncode == 0:
if not ask_question(
"Are these `(unreleased)` strings in built docs OK?"
):
raise AssertionError("`(unreleased)` strings found in docs")


def sign_source_artifacts(db: ReleaseShelf) -> None:
Expand Down