https://github.com/bigfootds/unity-semver-updater
NodeJS tool to update a Unity project's version to a specified format - typically the semver format.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
Repository
NodeJS tool to update a Unity project's version to a specified format - typically the semver format.
Basic Info
- Host: GitHub
- Owner: BigfootDS
- License: mit
- Language: TypeScript
- Default Branch: main
- Homepage: https://www.npmjs.com/package/@bigfootds/unity-semver-updater
- Size: 134 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
@bigfootds/unity-semver-updater
NodeJS tool to update a Unity project's version to a specified format - typically the semver format.
The intention is that this package exists separate from any automation workflow actions that might use it, so we can quickly prototype and iterate on the logic without the hassle of running automated workflows. Looking at you, GitHub Actions, and how painful it is to run things locally.
For example, this GitHub Action uses this package as the core of its logic:
If you wanna use this package in your own actions, or you just wish to modify it or archive it or do whatever with it, you can do so - this package is licensed with MIT license!
Installation
Install this package from the NPM registry into your NodeJS project by running:
npm install @bigfootds/unity-semver-updater
Usage
```js const { findProjectSettingsPath } = require("../src/utils/autoFindProjectSettings"); // not part of the library - logic to glob files is not part of this package
const { ProjectSettingsHelpers } = require("@bigfootds/unity-semver-updater");
async function app (){
let targetFiles = await findProjectSettingsPath();
let targetFile = targetFiles[0];
let result = await ProjectSettingsHelpers.getExistingBundleVersion(targetFile);
console.log("String formatter example:");
// Default, per the semver spec:
console.log(result.toString());
console.log(result.toFormattedOutput());
// Custom formats:
console.log(result.toFormattedOutput("{major}-banana-{minor}"));
// Typical version number structures per the Unity docs:
let valuesToWrite = {
bundleVersion: result.toFormattedOutput("{major}.{minor}.{patch}-{releaseLabel}+{buildLabel}"),
buildNumber: {
Standalone: Number.parseInt(result.toFormattedOutput("{major}{minor}{patch}")),
iPhone: Number.parseInt(result.toFormattedOutput("{major}{minor}{patch}")),
tvOS: Number.parseInt(result.toFormattedOutput("{major}{minor}{patch}"))
},
switchReleaseVersion: Number.parseInt(result.toFormattedOutput("{major}{minor}{patch}")),
switchDisplayVersion: result.toFormattedOutput("{major}.{minor}.{patch}"),
ps4MasterVersion: result.toFormattedOutput("{major}.{minor}"),
ps4AppVersion: result.toFormattedOutput("{major}.{minor}"),
metroPackageVersion: result.toFormattedOutput("{major}.{minor}.{patch}.{build}"),
XboxOneVersion: result.toFormattedOutput("{major}.{minor}.{patch}.{build}"),
psp2MasterVersion: result.toFormattedOutput("{major}.{minor}"),
psp2AppVersion: result.toFormattedOutput("{major}.{minor}")
}
// Write a PlayerSettingsVersionStrings instance to the ProjectSettings.asset file:
let writeResult = await ProjectSettingsHelpers.writeToProjectSettings(targetFile, valuesToWrite);
// Boolean file update result:
console.log("Write result: " + writeResult);
}
app(); ```
When the above code is run and the ProjectSettings.asset file contains bundleVersion: 0.1.0.0-rc1, this will be the output:
String formatter example:
0.1.0-rc1
0.1.0
0-banana-1
Write result: true
Owner
- Name: BigfootDS
- Login: BigfootDS
- Kind: organization
- Email: contact@bigfootds.com
- Location: Sydney, AUS
- Website: https://bigfootds.com
- Repositories: 1
- Profile: https://github.com/BigfootDS
Game development group.
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 4 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
npmjs.org: @bigfootds/unity-semver-updater
NodeJS tool to update a Unity project's version to a specified format - typically the semver format.
- Homepage: https://github.com/BigfootDS/unity-semver-updater#readme
- License: MIT
-
Latest release: 0.0.5
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- JS-DevTools/npm-publish v3 composite
- actions/checkout v4 composite
- actions/create-release v1 composite
- actions/setup-node v4 composite
- eregon/publish-release v1.0.6 composite
- mathieudutour/github-tag-action v6.2 composite
- reedyuk/npm-version master composite
- stefanzweifel/git-auto-commit-action v5 composite
- 292 dependencies
- @types/node ^20.14.10 development
- jest ^29.7.0 development
- typescript ^5.5.3 development