Skip to content

Commit

Permalink
Merge pull request #154 from solidjs-community/update-version-script
Browse files Browse the repository at this point in the history
update version script
  • Loading branch information
joshwilsonvu authored Aug 31, 2024
2 parents 88ab608 + c14b992 commit a0db0d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Bump version
run: pnpm run version -- ${{ inputs.version }}
run: pnpm run version ${{ inputs.version }}

- name: Create PR with new versions
uses: peter-evans/create-pull-request@v6
Expand Down
15 changes: 5 additions & 10 deletions packages/eslint-plugin-solid/scripts/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,16 @@ const buildTilde = async () => {
].join("\n");
};

async function run() {
await markdownMagic(path.join(__dirname, "..", "README.md"), {
markdownMagic(
[path.join(__dirname, "..", "README.md"), path.join(__dirname, "..", "docs", "*.md")],
{
transforms: {
RULES: () => buildRulesTable(ruleTableRows),
TILDE: () => buildTilde(),
},
failOnMissingTransforms: true,
});
await markdownMagic(path.resolve(__dirname, "..", "docs", "*.md"), {
transforms: {
HEADER: ({ srcPath }: any) => buildHeader(path.basename(srcPath)),
OPTIONS: ({ srcPath }: any) => buildOptions(path.basename(srcPath)),
CASES: ({ content, srcPath }: any) => buildCases(content, path.basename(srcPath)),
},
failOnMissingTransforms: true,
});
}
run();
}
);
3 changes: 2 additions & 1 deletion scripts/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ await Promise.all([
await new Promise((resolve, reject) => {
exec(
`git commit --all --message="v${newVersion}"; git tag "v${newVersion}";`,
(error, stdout) => {
(error, stdout, stderr) => {
if (error) {
reject(error);
} else {
console.log(stdout);
console.log(stderr);
resolve(stdout);
}
}
Expand Down

0 comments on commit a0db0d5

Please sign in to comment.