Skip to content

Commit 8365588

Browse files
chore: make container the default (drop repro: prefix)
- Default scripts run inside Docker (build/typecheck/test/format) - Add shell, ci:install, build:canonical, host:* fallbacks - Update workflows to use default scripts; update README Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
1 parent f6a3dd5 commit 8365588

File tree

5 files changed

+35
-31
lines changed

5 files changed

+35
-31
lines changed

.github/workflows/pr-check.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@ jobs:
4545
${{ runner.os }}-pnpm-store-
4646
4747
- name: Mark repo as safe for git inside container
48-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh git config --global --add safe.directory /workspace
48+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm shell git config --global --add safe.directory /workspace
4949

5050
- name: Install deps (container)
51-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm install --frozen-lockfile
51+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm ci:install
5252

5353
- name: Disable turbo telemetry (container)
54-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo telemetry disable
54+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm turbo:telemetry:disable
5555

5656
- name: Check formatting (container)
57-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm format:check
57+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm format:check
5858

5959
- name: Build (container)
60-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo build --force
60+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm build -- --force
6161

6262
- name: Test (container)
63-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo test --force
63+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm test
6464

6565
- name: Require changeset to be present in PR (container)
6666
if: github.event.pull_request.user.login != 'dependabot[bot]'
67-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm changeset status --since origin/main
67+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm shell pnpm changeset status --since origin/main

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
${{ runner.os }}-pnpm-store-
5151
5252
- name: Install deps (container)
53-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm install --frozen-lockfile
53+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm ci:install
5454

5555
- name: Lingo.dev (container)
5656
if: ${{ !inputs.skip_lingo }}
@@ -69,13 +69,13 @@ jobs:
6969
--parallel true
7070
7171
- name: Disable turbo telemetry (container)
72-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo telemetry disable
72+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm turbo:telemetry:disable
7373

7474
- name: Build (container)
75-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo build --force
75+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm build -- --force
7676

7777
- name: Test (container)
78-
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh pnpm turbo test --force
78+
run: REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm test
7979

8080
- name: Create Release Pull Request or Publish to npm
8181
id: changesets

.github/workflows/reproducible-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
env:
3535
GIT_COMMIT: ${{ github.sha }}
3636
run: |
37-
REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" bash scripts/repro/exec.sh bash scripts/repro/build.sh
37+
REPRO_PNPM_STORE="${{ env.REPRO_PNPM_STORE }}" pnpm build:canonical
3838
3939
- name: Upload canonical artifact and checksums
4040
uses: actions/upload-artifact@v4

package.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
"type": "module",
44
"scripts": {
55
"prepare": "husky",
6-
"build": "turbo build",
7-
"typecheck": "turbo typecheck",
8-
"test": "turbo test",
6+
"build": "bash scripts/repro/exec.sh pnpm turbo build",
7+
"typecheck": "bash scripts/repro/exec.sh pnpm turbo typecheck",
8+
"test": "bash scripts/repro/exec.sh pnpm turbo test",
99
"new": "changeset",
1010
"new:empty": "changeset --empty",
11-
"format": "prettier . --write",
12-
"format:check": "prettier . --check",
13-
"repro:build": "bash scripts/repro/local.sh",
14-
"repro:exec": "bash scripts/repro/exec.sh",
15-
"repro:typecheck": "bash scripts/repro/exec.sh pnpm typecheck",
16-
"repro:test": "bash scripts/repro/exec.sh pnpm test",
17-
"repro:format:check": "bash scripts/repro/exec.sh pnpm format:check"
11+
"format": "bash scripts/repro/exec.sh pnpm prettier . --write",
12+
"format:check": "bash scripts/repro/exec.sh pnpm prettier . --check",
13+
"build:canonical": "bash scripts/repro/local.sh",
14+
"shell": "bash scripts/repro/exec.sh",
15+
"ci:install": "bash scripts/repro/exec.sh pnpm install --frozen-lockfile",
16+
"turbo:telemetry:disable": "bash scripts/repro/exec.sh pnpm turbo telemetry disable",
17+
"host:build": "turbo build",
18+
"host:typecheck": "turbo typecheck",
19+
"host:test": "turbo test",
20+
"host:format": "prettier . --write",
21+
"host:format:check": "prettier . --check"
1822
},
1923
"devDependencies": {
2024
"@babel/generator": "^7.27.1",

readme/reproducible-builds.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ This guide explains how to run all dev and CI tasks inside the same pinned conta
1414

1515
---
1616

17-
## Local: run everything inside the container
17+
## Local: run everything inside the container (default)
1818

1919
- Open a shell in the container at the repo root:
2020

2121
```bash
22-
pnpm repro:exec
22+
pnpm run shell
2323
```
2424

2525
- Common tasks (all run inside the container):
2626

2727
```bash
28-
pnpm repro:typecheck # pnpm typecheck in container
29-
pnpm repro:test # pnpm test in container
30-
pnpm repro:format:check # pnpm format:check in container
31-
pnpm repro:exec -- pnpm turbo build --force
28+
pnpm typecheck # containerized typecheck
29+
pnpm test # containerized tests
30+
pnpm format:check # containerized formatting check
31+
pnpm build -- --force # force rebuild inside container
3232
```
3333

3434
- Hermetic build that creates canonical artifacts:
3535

3636
```bash
37-
pnpm repro:build
37+
pnpm build:canonical
3838
```
3939

4040
Outputs:
@@ -56,7 +56,7 @@ Optional: speed up pnpm by caching the store locally across runs:
5656

5757
```bash
5858
export REPRO_PNPM_STORE="$HOME/.pnpm-store-lingo"
59-
pnpm repro:exec -- pnpm install --frozen-lockfile
59+
pnpm ci:install
6060
```
6161

6262
Common tokens are passed through automatically if set in your shell: `GH_TOKEN`, `GITHUB_TOKEN`, `NPM_TOKEN`, `LINGODOTDEV_API_KEY`.
@@ -105,7 +105,7 @@ The checksums must match for the same commit.
105105

106106
1. Edit `Dockerfile.repro` (Node image or pnpm version via corepack)
107107
2. Update image tag references if needed
108-
3. Run `pnpm repro:build` locally; verify checksum stability for the same commit
108+
3. Run `pnpm build:canonical` locally; verify checksum stability for the same commit
109109
4. Open a PR; CI will rebuild and upload artifacts for verification
110110

111111
---

0 commit comments

Comments
 (0)