Skip to content

Commit

Permalink
make_latest
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Apr 1, 2024
1 parent 48930d5 commit 62ee34e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions scripts/changeset/update-changelog.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ function sleep(time: number) {
}

await (async () => {

const { PUBLISHED, GITHUB_REPOSITORY, GITHUB_TOKEN, RELEASE_TAG, REF_NAME } =
process.env;


if (!GITHUB_TOKEN) {
core.setFailed("Please add GITHUB_TOKEN to the environment");
return;
Expand All @@ -32,7 +30,7 @@ await (async () => {
}

execSync(`git checkout ${REF_NAME}`);

const octokit = github.getOctokit(GITHUB_TOKEN);

if (PUBLISHED === "false") {
Expand Down Expand Up @@ -72,7 +70,7 @@ await (async () => {
* https://github.com/FuelLabs/fuels-ts/actions/runs/8421817249/job/23059607346#step:9:24
* That's why this return statement was added.
*/
execSync('echo "Did not find changeset PR..."', {stdio: "inherit"})
execSync('echo "Did not find changeset PR..."', { stdio: "inherit" });
return;
}

Expand All @@ -97,9 +95,9 @@ await (async () => {
...github.context.repo,
tag: RELEASE_TAG,
});
execSync("git fetch --tags")

execSync("git fetch --tags");

const commit = execSync(`git rev-list --no-walk ${RELEASE_TAG}`)
.toString()
.trim();
Expand All @@ -118,6 +116,7 @@ await (async () => {
...github.context.repo,
release_id: release.data.id,
body: pr.data.body as string,
make_latest: REF_NAME === "master" ? "true" : "false",
});
}
})();

0 comments on commit 62ee34e

Please sign in to comment.