mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Merge pull request #1241 from bbassie/chore/move-root-scripts
Move clean and publish scripts into scripts folder
This commit is contained in:
1 parent
a49841f3fc
commit
8692ea3941
8 files changed
+11
-11
No files matched your search
@@ -40,7 +40,7 @@ jobs:
|
||||
node-version: 24.x
|
||||
- run: pnpm install --no-frozen-lockfile
|
||||
- run: pnpm -r --filter='./packages/*' --filter='./plugins/*' --fail-if-no-match run build-mod --output-dir ../../dist
|
||||
- run: node ./publish.js factorio ./dist
|
||||
- run: node ./scripts/publish.js factorio ./dist
|
||||
env:
|
||||
FACTORIO_TOKEN: ${{ secrets.FACTORIO_TOKEN }}
|
||||
- uses: softprops/action-gh-release@v3
|
||||
|
||||
@@ -30,7 +30,7 @@ Use the detailed guides for the affected area:
|
||||
The harness needs Factorio, recreates `temp/test/`, and shares ports 8880/4443; do not run competing suites.
|
||||
- Report checks, failures, skips, and unverified behavior precisely.
|
||||
Documentation-only changes need path, command, and formatting checks.
|
||||
- Preview cleanup with `node clean.js --dry-run`; see the [cleanup scopes](docs/contributing.md#cleaning-generated-and-runtime-files).
|
||||
- Preview cleanup with `node scripts/clean.js --dry-run`; see the [cleanup scopes](docs/contributing.md#cleaning-generated-and-runtime-files).
|
||||
Runtime-data deletion and release publication require explicit authorization.
|
||||
Keep local configs, credentials, runtime data, and generated output out of commits.
|
||||
- Follow the [PR template](.github/pull_request_template.md), including `### Changelog` (`None.` when appropriate).
|
||||
@@ -229,13 +229,13 @@ For documentation changes, check that links, paths, and example commands are cor
|
||||
|
||||
### Cleaning generated and runtime files
|
||||
|
||||
Inspect `node clean.js --help` and preview the selected scope with `--dry-run` before cleaning.
|
||||
Inspect `node scripts/clean.js --help` and preview the selected scope with `--dry-run` before cleaning.
|
||||
|
||||
| Command | Removal scope |
|
||||
| --- | --- |
|
||||
| `node clean.js --dry-run` | Preview workspace package/plugin build output and Vite dependency caches; omit `--dry-run` to clean, or use `pnpm clean`. |
|
||||
| `node clean.js tests --dry-run` | Also preview root `.nyc_output/`, `coverage/`, the whole `temp/` directory, and `static/`. |
|
||||
| `node clean.js all --dry-run` | Also preview runtime databases, instances, logs, mods, local configs, `FactorioAdminToken.txt`, and `plugin-list.json`. |
|
||||
| `node scripts/clean.js --dry-run` | Preview workspace package/plugin build output and Vite dependency caches; omit `--dry-run` to clean, or use `pnpm clean`. |
|
||||
| `node scripts/clean.js tests --dry-run` | Also preview root `.nyc_output/`, `coverage/`, the whole `temp/` directory, and `static/`. |
|
||||
| `node scripts/clean.js all --dry-run` | Also preview runtime databases, instances, logs, mods, local configs, `FactorioAdminToken.txt`, and `plugin-list.json`. |
|
||||
|
||||
`all` deletes cluster runtime data, including configurations and saves; back up anything you want to keep before using it.
|
||||
The cleaner excludes `external_plugins/` and does not remove mod archives in root `dist/`.
|
||||
|
||||
@@ -62,7 +62,7 @@ The steps below describe publishing npm packages manually instead.
|
||||
The repository does not track `pnpm-lock.yaml`, so allow pnpm to generate or update it during installation.
|
||||
|
||||
```sh
|
||||
node clean.js --dry-run
|
||||
node scripts/clean.js --dry-run
|
||||
pnpm clean
|
||||
pnpm install --no-frozen-lockfile
|
||||
pnpm -r --filter='./packages/*' --filter='./plugins/*' --fail-if-no-match publish
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
"ci-cover": "c8 --reporter=lcovonly pnpm test",
|
||||
"lint": "oxlint packages plugins test",
|
||||
"lint-fix": "oxlint --fix packages plugins test",
|
||||
"clean": "node ./clean.js",
|
||||
"clean": "node ./scripts/clean.js",
|
||||
"bundle-dependencies": "bundle-dependencies"
|
||||
},
|
||||
"c8": {
|
||||
|
||||
@@ -10,7 +10,7 @@ import path from "node:path";
|
||||
import fs from "node:fs/promises";
|
||||
import yargs from "yargs";
|
||||
|
||||
import npmPackage from "./package.json" with { type: "json" };
|
||||
import npmPackage from "../package.json" with { type: "json" };
|
||||
const workspaces = npmPackage.workspaces
|
||||
.map(p => p.slice(0, -2))
|
||||
.filter(p => !p.includes("external_plugins"));
|
||||
File renamed without changes.
+2
-2
@@ -4,7 +4,7 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
import { publishMods, uploadModRelease } from "../publish.js";
|
||||
import { publishMods, uploadModRelease } from "../scripts/publish.js";
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
|
||||
@@ -94,7 +94,7 @@ describe("mod publishing", function() {
|
||||
`;
|
||||
const { stdout, stderr } = await execFileAsync(process.execPath, [
|
||||
"--import", `data:text/javascript,${encodeURIComponent(mockFetch)}`,
|
||||
"publish.js", "factorio", directory, "--dry-run",
|
||||
"scripts/publish.js", "factorio", directory, "--dry-run",
|
||||
]);
|
||||
assert.equal(stderr, "");
|
||||
assert(stdout.includes("Requesting current releases of cli_publish_test"));
|
||||
|
||||
Reference in new issue
Block a user