Skip to content

Commit

Permalink
Bump to v0.6.4 (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
tushuhei authored Jan 28, 2025
1 parent d1f8124 commit 1f20187
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion budoux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from . import parser

__version__ = "0.6.3"
__version__ = "0.6.4"

Parser = parser.Parser
load_default_japanese_parser = parser.load_default_japanese_parser
Expand Down
13 changes: 11 additions & 2 deletions bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import argparse
import json
import re
import subprocess

Expand All @@ -34,8 +35,16 @@ def main():
f.write(new_content)

# Updates JavaScript port version number
npm_command = ['npm', 'version', new_version, '--no-git-tag-version']
subprocess.run(npm_command, cwd='javascript', check=True)
package_json_path = 'javascript/package.json'
with open(package_json_path, 'r') as f:
package_data = json.load(f)
current_version = package_data.get('version')

if current_version != new_version:
npm_command = ['npm', 'version', new_version, '--no-git-tag-version']
subprocess.run(npm_command, cwd='javascript', check=True)
else:
print(f"JavaScript version is already {new_version}, skipping npm version.")

cli_file = 'javascript/src/cli.ts'
with open(cli_file, 'r') as f:
Expand Down
4 changes: 2 additions & 2 deletions javascript/package-lock.json

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

2 changes: 1 addition & 1 deletion javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "budoux",
"version": "0.6.3",
"version": "0.6.4",
"description": "A small chunk segmenter.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion javascript/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
loadDefaultJapaneseParser,
} from './index.js';

const CLI_VERSION = '0.6.3';
const CLI_VERSION = '0.6.4';
const defaultParsers = loadDefaultParsers();

/**
Expand Down

0 comments on commit 1f20187

Please # to comment.