Skip to content

Commit

Permalink
hotfix/update-version script path (#593)
Browse files Browse the repository at this point in the history
Co-authored-by: JongHak Seo <[email protected]>
  • Loading branch information
PatrykKuniczak and Jonghakseo authored Jul 27, 2024
1 parent e94cfc7 commit dd323cb
Show file tree
Hide file tree
Showing 23 changed files with 38 additions and 31 deletions.
9 changes: 2 additions & 7 deletions UPDATE-PACKAGE-VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
For update package version in all ```package.json``` files use this command in root:

```bash
./update_version.sh <new_version>
```

or

FOR WINDOWS YOU NEED TO USE E.G ```GIT BASH``` CONSOLE OR OTHER WHICH SUPPORT UNIX COMMANDS
```bash
pnpm update-version <new_version>
```

If script run successfully you will see ```Updated versions to <new_version>```
If script was run successfully you will see ```Updated versions to <new_version>```
2 changes: 1 addition & 1 deletion chrome-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chrome-extension",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension",
"scripts": {
"clean": "rimraf ../../dist",
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chrome-extension-boilerplate-react-vite",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension boilerplate",
"license": "MIT",
"repository": {
Expand All @@ -23,7 +23,9 @@
"lint:fix": "turbo lint:fix --continue -- --fix --cache --cache-location node_modules/.cache/.eslintcache",
"prettier": "turbo prettier --continue -- --cache --cache-location node_modules/.cache/.prettiercache",
"prepare": "husky",
"update-version": "./update_version.sh"
"update-version": "run-script-os",
"update-version:win32": "bash update_version.sh",
"update-version:default": "./update_version.sh"
},
"type": "module",
"dependencies": {
Expand Down Expand Up @@ -57,7 +59,8 @@
"tslib": "^2.6.3",
"turbo": "^2.0.9",
"typescript": "5.5.3",
"vite": "5.3.3"
"vite": "5.3.3",
"run-script-os": "^1.1.6"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/dev-utils",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension dev utils",
"private": true,
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/hmr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/hmr",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension hot module reload or refresh",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/shared",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension shared code",
"private": true,
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/storage",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension storage",
"private": true,
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/tailwind-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/tailwindcss-config",
"version": "0.2.0",
"version": "0.2.2",
"description": "Tailwind CSS configuration for boilerplate",
"main": "./tailwind.config.js",
"private": true
Expand Down
2 changes: 1 addition & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/tsconfig",
"version": "0.2.0",
"version": "0.2.2",
"description": "tsconfig for chrome extension",
"private": true
}
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/ui",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension ui components",
"private": true,
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/vite-config",
"version": "0.2.0",
"version": "0.2.2",
"description": "Vite base configuration",
"main": "index.mjs",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/zipper/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/zipper",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension zipper",
"private": true,
"sideEffects": false,
Expand Down
2 changes: 1 addition & 1 deletion pages/content-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/content-runtime-script",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension content runtime script",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/content-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/content-ui",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension content ui",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/content/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/content-script",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension content script",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/devtools-panel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/devtools-panel",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension devtools panel",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/devtools",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension devtools",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/new-tab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/new-tab",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension new tab",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/options/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/options",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension options",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/popup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/popup",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension popup",
"private": true,
"sideEffects": true,
Expand Down
2 changes: 1 addition & 1 deletion pages/side-panel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@extension/sidepanel",
"version": "0.2.0",
"version": "0.2.2",
"description": "chrome extension sidepanel",
"private": true,
"sideEffects": true,
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [[ "$1" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
perl -i -pe"s/$current_version/'$1'/" "$0"
' {} \;

echo "Updated versions to $1"
echo "Updated versions to $1";
else
echo "Version format <$1> isn't correct, proper format is <0.0.0>"
echo "Version format <$1> isn't correct, proper format is <0.0.0>";
fi

0 comments on commit dd323cb

Please sign in to comment.