Skip to content

Commit fc6246c

Browse files
committed
version publish
1 parent 6fcac52 commit fc6246c

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

packages/deparser/config/deparser-versions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"copy": "copyfiles -f ../../../../LICENSE README.md package.json dist",
3939
"clean": "rimraf dist",
4040
"prepare": "npm run build",
41-
"build": "npm run clean && tsc && tsc -p tsconfig.esm.json && npm run copy"
41+
"build": "npm run clean && tsc && tsc -p tsconfig.esm.json && npm run copy",
42+
"publish:pkg": "npm publish --tag {{VERSION_TAG}}"
4243
},
4344
"publishConfig": {
4445
"access": "public",

packages/deparser/scripts/generate-version-packages.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ function generatePackageJson(packageName: string, version: string, versionConfig
3838
[`@pgsql/types`]: `^${versionConfig.typesVersion}`
3939
}
4040
};
41+
42+
packageJson.scripts['publish:pkg'] = `npm publish --tag ${versionConfig.npmTag}`;
4143

4244
return packageJson;
4345
}

packages/parser/config/package.template.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"build:dev": "npm run clean && tsc --declarationMap && tsc -p tsconfig.esm.json && npm run copy",
2828
"lint": "eslint . --fix",
2929
"test": "jest",
30-
"test:watch": "jest --watch"
30+
"test:watch": "jest --watch",
31+
"publish:pkg": "npm publish --tag {{VERSION_TAG}}"
3132
},
3233
"keywords": [
3334
"sql",

packages/parser/scripts/prepare-versions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pgVersions.forEach(pgVersion => {
4848
.replace(/{{VERSION}}/g, `${pgVersion}.0.0`)
4949
.replace(/{{LIBPG_QUERY_VERSION}}/g, libpgQueryVersion)
5050
.replace(/{{PGSQL_PARSER_VERSION}}/g, pgsqlParserVersion)
51+
.replace(/{{VERSION_TAG}}/g, `v${pgVersion}`)
5152
.replace(/{{TYPES_VERSION}}/g, typesVersion);
5253

5354
fs.writeFileSync(

0 commit comments

Comments
 (0)