From da347c9e551e268c995e659929a1cfe32f89af5b Mon Sep 17 00:00:00 2001 From: M Gilang Januar Date: Sat, 11 Dec 2021 09:26:24 +0700 Subject: [PATCH] 1.0.0 --- package.json | 2 +- server/package.json | 4 ++-- upgrade.js | 22 ++++++++++++++++++++++ web/package.json | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 upgrade.js diff --git a/package.json b/package.json index 92b1f18ef..12d8222e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teledrive", - "version": "0.1.0", + "version": "1.0.0", "repository": "git@github.com:mgilangjanuar/teledrive.git", "author": "M Gilang Januar ", "license": "MIT", diff --git a/server/package.json b/server/package.json index 89e365cd9..ca6fa8191 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "0.1.0", + "version": "1.0.0", "main": "dist/index.js", "license": "MIT", "private": true, @@ -76,4 +76,4 @@ "rimraf": "^3.0.2", "typescript": "^4.4.2" } -} +} \ No newline at end of file diff --git a/upgrade.js b/upgrade.js new file mode 100644 index 000000000..def6fe546 --- /dev/null +++ b/upgrade.js @@ -0,0 +1,22 @@ +const fs = require('fs') +const { execSync } = require('child_process') + +const root = fs.readFileSync('./package.json', 'utf-8') +const rootObj = JSON.parse(root) +rootObj.version = process.argv[2] +fs.writeFileSync('./package.json', JSON.stringify(rootObj, null, 2)) + +const api = fs.readFileSync('./server/package.json', 'utf-8') +const apiObj = JSON.parse(api) +apiObj.version = process.argv[2] +fs.writeFileSync('./server/package.json', JSON.stringify(apiObj, null, 2)) +// execSync('cd ./server && yarn install && cd ..') + +const web = fs.readFileSync('./web/package.json', 'utf-8') +const webObj = JSON.parse(web) +webObj.version = process.argv[2] +fs.writeFileSync('./web/package.json', JSON.stringify(webObj, null, 2)) +// execSync('cd ./web && yarn install && cd ..') + +execSync('yarn install && yarn workspaces run build') +execSync(`git add . && git commit -m "${process.argv[2]}"`) \ No newline at end of file diff --git a/web/package.json b/web/package.json index 1b8ea14b9..439518751 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "0.1.0", + "version": "1.0.0", "private": true, "dependencies": { "@craco/craco": "^6.3.0", @@ -87,4 +87,4 @@ "workbox-strategies": "^5.1.3", "workbox-streams": "^5.1.3" } -} +} \ No newline at end of file