https://github.com/bigfootds/unity-semver-updater

NodeJS tool to update a Unity project's version to a specified format - typically the semver format.

https://github.com/bigfootds/unity-semver-updater

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

automation gameci gamedev semver unity versioning
Last synced: 5 months ago · JSON representation

Repository

NodeJS tool to update a Unity project's version to a specified format - typically the semver format.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Topics
automation gameci gamedev semver unity versioning
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

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

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.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 4 Last month
Rankings
Dependent repos count: 27.0%
Average: 33.2%
Dependent packages count: 39.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/cd_npm.yml actions
  • 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
package-lock.json npm
  • 292 dependencies
package.json npm
  • @types/node ^20.14.10 development
  • jest ^29.7.0 development
  • typescript ^5.5.3 development