question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parse "../package.json" as app version

See original GitHub issue

The package.version field of tauri.conf.json supports using "../package.json" as a value, so they share the same version. From what I can tell, this package doesn’t check if that’s the case, leading to an error in my app’s workflow:

   Compiling note-boi v0.1.0 (/Users/runner/work/note-boi/note-boi/src-tauri)
    Finished release [optimized] target(s) in 6m 35s
    Bundling NoteBoi.app
    Bundling "/Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/dmg/NoteBoi_0.1.3_x64.dmg"
info: running bundle_dmg.sh
    Bundling "/Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app.tar.gz"
        /Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app
        /Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/dmg/NoteBoi_0.1.3_x64.dmg
        /Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app.tar.gz (updater)
    Finished 3 bundles at:
[Signed] 1 updater archive at:
        /Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app.tar.gz.sig
Artifacts: /Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app,/Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app.tar.gz,/Users/runner/work/note-boi/note-boi/src-tauri/target/release/bundle/macos/NoteBoi.app.tar.gz.sig.
Couldn't find release with tag v../package.json. Creating one.
Error: Validation Failed: {"resource":"Release","code":"custom","field":"tag_name","message":"tag_name is not a valid tag"}, {"resource":"Release","code":"custom","field":"tag_name","message":"tag_name is not well-formed"}, {"resource":"Release","code":"custom","message":"Published releases must have a valid tag"}

Have I made a mistake somewhere or is this a feature that needs to be added?

Relevant YAML file.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
FabianLarscommented, Apr 30, 2022

Have I made a mistake somewhere or is this a feature that needs to be added?

You’re right, it’s not handled correctly. Thx for the report.

0reactions
nwesterhausencommented, Jun 16, 2022

I have had it working since the merge by using the commit hash: ‘@<hash>’

I was not have success leaving it at ‘@v0

Quick update: After trying ‘@dev’ I have had success.

On Wed, Jun 15, 2022, 4:28 AM Fabian-Lars @.***> wrote:

As long as you use @.*** or @dev it should pull the latest version automatically. And yes, it’s supposedly fixed now, though I didn’t test it myself yet tbh.

— Reply to this email directly, view it on GitHub https://github.com/tauri-apps/tauri-action/issues/262#issuecomment-1156159644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARVYRMB7PBYSM7KX5QT3ZLVPGH3PANCNFSM5UY4ZL7A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to get version from package.json in nodejs code?
Here is how to read the version out of package.json: fs = require('fs') json = JSON.parse(fs.readFileSync('package.json', 'utf8')) version ...
Read more >
How to show your App Version from package.json in your Vue ...
This exports the version of your package.json file in a global property which you can access in your code using the process.env object....
Read more >
Extract version from package.json (NPM) using bash / shell
Extract version from package.json (NPM) using bash / shell ... I have a folder named desk-app the same as the name field in...
Read more >
package.json - npm Docs
json are the name and version fields as they will be required. The name and version together form an identifier that is assumed...
Read more >
Best ways to get package.json version in NodeJS with examples
import fs module · read json file using readFileSync function · Convert string into json using the JSON parse method.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found