mirror of
https://github.com/morten-olsen/bob.git
synced 2026-02-08 01:46:29 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b722d385f7 |
4
.github/workflows/release-package.yml
vendored
4
.github/workflows/release-package.yml
vendored
@@ -108,7 +108,7 @@ jobs:
|
||||
pnpm install
|
||||
git config user.name "Github Actions Bot"
|
||||
git config user.email "<>"
|
||||
pnpm version $(git describe --tag --abbrev=0)
|
||||
pnpm publish -r --publish-branch main --access public
|
||||
pnpm ts-node -T scripts/set-version.ts $(git describe --tag --abbrev=0)
|
||||
pnpm publish -r --publish-branch main --access public --no-git-checks
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
11
package.json
11
package.json
@@ -1,10 +1,16 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@pnpm/find-workspace-packages": "^6.0.9",
|
||||
"@pnpm/logger": "^5.0.0",
|
||||
"@react-native-community/eslint-config": "^3.2.0",
|
||||
"eslint": "^8.33.0",
|
||||
"prettier": "^2.8.3",
|
||||
"ts-node": "^10.9.1",
|
||||
"turbo": "^1.9.9"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "turbo build",
|
||||
@@ -14,5 +20,8 @@
|
||||
"test": "turbo test"
|
||||
},
|
||||
"version": "0.1.8",
|
||||
"name": "@bob-the-algorithm/repo"
|
||||
"name": "@bob-the-algorithm/repo",
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.5.9"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
"scripts": {
|
||||
"build": "tsc --build configs/tsconfig.libs.json"
|
||||
},
|
||||
"types": "./dist/cjs/types/index.d.ts"
|
||||
"types": "./dist/cjs/types/index.d.ts",
|
||||
"version": "0.1.8"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@bob-the-algorithm/config",
|
||||
"private": false,
|
||||
"version": "0.0.1"
|
||||
"version": "0.1.8"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@bob-the-algorithm/playground",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"version": "0.1.8",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
1050
pnpm-lock.yaml
generated
1050
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
26
scripts/set-version.ts
Normal file
26
scripts/set-version.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { findWorkspacePackages } from '@pnpm/find-workspace-packages';
|
||||
import { writeFile } from 'fs/promises';
|
||||
import { join } from 'path';
|
||||
|
||||
const version = process.argv[2];
|
||||
if (!version) {
|
||||
throw new Error('Version is required');
|
||||
}
|
||||
|
||||
const run = async () => {
|
||||
const packages = await findWorkspacePackages(process.cwd());
|
||||
|
||||
for (const { manifest, dir } of packages) {
|
||||
console.log(dir, version);
|
||||
manifest.version = version;
|
||||
await writeFile(
|
||||
join(dir, 'package.json'),
|
||||
JSON.stringify(manifest, null, 2),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
run().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user