Skip to content

Commit

Permalink
build(action): rebuild after fixing version parse error (#268)
Browse files Browse the repository at this point in the history
* fix(core): version parse error when referring to package.json

* fix(core): version parse error when referring to package.json

* build(action): rebuild after fixing version parse error

* cleanup

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
  • Loading branch information
rexcape and lucasfernog authored May 28, 2022
1 parent b6b8932 commit 16a8f02
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/package-json.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tauri-apps/action-core": patch
"action": patch
---

Added support to loading version from JSON file in `tauri.conf.json > package > version`.
2 changes: 1 addition & 1 deletion packages/action/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export function getInfo(root: string): Info {
if (config.package) {
name = config.package.productName
version = config.package.version
if (config.package.version?.endsWith('package.json')) {
if (config.package.version?.endsWith('.json')) {
const packageJsonPath = join(tauriDir, config.package.version)
const contents = readFileSync(packageJsonPath).toString()
version = JSON.parse(contents).version
Expand Down

0 comments on commit 16a8f02

Please sign in to comment.