Skip to content

Commit

Permalink
TESTING PUBLISH
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Jan 27, 2024
1 parent 74ed792 commit 4c976df
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 135 deletions.
1 change: 1 addition & 0 deletions js/api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@project-gauntlet/api",
"version": "0.0.0",
"type": "module",
"exports": {
"./components": {
Expand Down
1 change: 1 addition & 0 deletions js/deno/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@project-gauntlet/deno",
"version": "0.0.0",
"type": "module",
"exports": {
".": {
Expand Down
1 change: 0 additions & 1 deletion js/release/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@project-gauntlet/release",
"version": "0.1.0",
"scripts": {
"release": "tsc --noEmit && rollup --config rollup.config.ts --configPlugin typescript && node dist/main.js just-do-it"
},
Expand Down
12 changes: 6 additions & 6 deletions js/release/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ async function doRelease() {
const apiProjectPath = path.join(projectRoot, "js", "api");

const versionRaw = await readFile(versionFilePath, { encoding: "utf-8" });
const version = Number(versionRaw.trim());
const oldVersion = Number(versionRaw.trim());

const newVersion = version + 1;
const newVersion = oldVersion + 1;

await writeFile(versionFilePath, `${newVersion}`)

Expand Down Expand Up @@ -85,13 +85,13 @@ async function doRelease() {
await writeFile(changelogFilePath, newChangelog.join(EOL))

const bumpNpmPackage = (packageDir: string) => {
execSync(`npm version 0.${version}.0`, { stdio: "inherit", cwd: packageDir })
execSync(`npm version 0.${newVersion}.0`, { stdio: "inherit", cwd: packageDir })
}

bumpNpmPackage(denoProjectPath)
bumpNpmPackage(apiProjectPath)

await git.commit(`Release v${version}`, [versionFilePath, changelogFilePath]);
await git.commit(`Release v${newVersion}`, [versionFilePath, changelogFilePath]);
await git.push()
await git.pushTags();

Expand All @@ -113,9 +113,9 @@ async function doRelease() {

const response = await octokit.request('POST /repos/{owner}/{repo}/releases', {
...repo,
tag_name: `v${version}`,
tag_name: `v${newVersion}`,
target_commitish: 'main',
name: `v${version}`,
name: `v${newVersion}`,
body: notesForCurrentRelease.join('\n'),
});

Expand Down
132 changes: 4 additions & 128 deletions package-lock.json

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

0 comments on commit 4c976df

Please sign in to comment.