-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display app version in Settings (#113)
- Loading branch information
Showing
6 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Usage: | ||
// node .github/workflows/publish/update-package-json.js 4.2.0 | ||
|
||
const fs = require('fs'); | ||
const version = process.argv[2]; // Get version from command line argument | ||
|
||
// Read package.json | ||
fs.readFile('package.json', (err, data) => { | ||
if (err) throw err; | ||
|
||
let json = JSON.parse(data); | ||
|
||
// Update version field | ||
json.version = version; | ||
|
||
// Write updated package.json | ||
fs.writeFile('package.json', JSON.stringify(json, null, 2), (err) => { | ||
if (err) throw err; | ||
console.log('Package.json file has been updated'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.