Skip to content

Commit

Permalink
Fabo/create version json (#3487)
Browse files Browse the repository at this point in the history
* added script to add version file on build

* changelog
  • Loading branch information
faboweb authored and jbibla committed Jan 27, 2020
1 parent 86156a9 commit 9c5e506
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/fabo_create-version-josn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Repository] Added script to add version to build files @faboweb
8 changes: 8 additions & 0 deletions tasks/create-version-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const fs = require("fs")

function main() {
const { version } = JSON.parse(fs.readFileSync("./package.json"))
fs.writeFileSync("./dist/version.json", `{"version": "${version}"}`, "utf8")

This comment has been minimized.

Copy link
@Bitcoinera

Bitcoinera Jan 28, 2020

Contributor

Aah I see. This is what was missing to be able to see the version number in Sentry errors, right?
Very clever

This comment has been minimized.

Copy link
@faboweb

faboweb Jan 28, 2020

Author Collaborator

no ^^

This comment has been minimized.

Copy link
@faboweb

faboweb Jan 28, 2020

Author Collaborator

That was #3449

This comment has been minimized.

Copy link
@Bitcoinera

Bitcoinera Jan 28, 2020

Contributor

Then what is this about? I want to know 😛

This comment has been minimized.

Copy link
@faboweb

faboweb Jan 28, 2020

Author Collaborator

this is about @iambeone s idea to query the current version of the build on startup and force a refresh of the app to avoid users using outdated versions of Lunie

This comment has been minimized.

Copy link
@Bitcoinera

Bitcoinera Jan 28, 2020

Contributor

Thank you 🙏

}

main()

0 comments on commit 9c5e506

Please sign in to comment.