Skip to content

Commit

Permalink
Move run-script action to separate folder
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
  • Loading branch information
t1m0thyj committed Feb 14, 2024
1 parent f09bbcf commit 34ae769
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 15 deletions.
23 changes: 21 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"author": "t1m0thyj",
"license": "Apache-2.0",
"workspaces": [
"packages/*"
"packages/*",
"script"
],
"devDependencies": {
"@types/jest": "^29.4.0",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/run-script/README.md → script/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Custom working directory to use instead of the project root.
## Example usage

```yaml
- uses: octorelease/run-script@master
- uses: octorelease/script@v1
with:
script: npmUpdate
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as fs from "fs";
import { loadScript } from "../src/loader";

describe("Run Script action", () => {
const scriptNames = fs.readdirSync(__dirname + "/../../../script/src").map(s => s.slice(0, s.lastIndexOf(".")));
const scriptNames = fs.readdirSync(__dirname + "/../scripts").map(s => s.slice(0, s.lastIndexOf(".")));

for (const scriptName of scriptNames) {
it("should load script " + scriptName, () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/run-script/package.json → script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "tsc -b && npm run lint",
"lint": "eslint src",
"pack": "node ../../esbuild.mjs",
"pack": "node ../esbuild.mjs",
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "tsc -w"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/run-script/src/loader.ts → script/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import { IContext } from "@octorelease/core";

const SCRIPTS: { [key: string]: any } = {
npmUpdate: require("../../../script/src/npmUpdate"),
prepareRelease: require("../../../script/src/prepareRelease"),
sonarConfig: require("../../../script/src/sonarConfig")
npmUpdate: require("../scripts/npmUpdate"),
prepareRelease: require("../scripts/prepareRelease"),
sonarConfig: require("../scripts/sonarConfig")
};

// List of scripts that should only run in release branches
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/run-script/tsconfig.json → script/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"extends": "../../tsconfig.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "./lib",
"rootDir": "./src"
},
"include": ["src"],
"references": [
{
"path": "../core"
"path": "../packages/core"
},
{
"path": "../git"
"path": "../packages/git"
}
]
}
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
"path": "packages/npm"
},
{
"path": "packages/run-script"
"path": "packages/vsce"
},
{
"path": "packages/vsce"
}
"path": "script"
},
]
}

0 comments on commit 34ae769

Please sign in to comment.