Skip to content

Commit

Permalink
build: fix git tag
Browse files Browse the repository at this point in the history
  • Loading branch information
kamijin-fanta committed Nov 28, 2022
1 parent 1402772 commit 8ca41e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/react-icons/scripts/task_common.ts
Expand Up @@ -110,7 +110,10 @@ export async function writeIconVersions({ DIST, LIB, rootDir }) {
version = packageJson.version;
} else {
const { stdout } = await exec(
`cd ${firstDir} && git describe --tags || cd ${firstDir} && git rev-parse HEAD`
`git describe --tags || git rev-parse HEAD`,
{
cwd: firstDir,
}
);
version = stdout.trim();
}
Expand Down Expand Up @@ -164,7 +167,7 @@ export async function writePackageJson(override, { DIST, LIB, rootDir }) {
...override,
};

const editedPackageJsonStr = JSON.stringify(packageJson, null, 2);
const editedPackageJsonStr = JSON.stringify(packageJson, null, 2) + "\n";
await fs.writeFile(path.resolve(DIST, "package.json"), editedPackageJsonStr);
}

Expand Down

0 comments on commit 8ca41e7

Please sign in to comment.