https://github.com/mob-sakai/unity-changeset
Get/List Unity editor changeset
https://github.com/mob-sakai/unity-changeset
changeset changesets npm-package unity unity3d version versions
Last synced: 5 months ago
JSON representation
Get/List Unity editor changeset
- Host: GitHub
- URL: https://github.com/mob-sakai/unity-changeset
- Owner: mob-sakai
- License: mit
- Created: 2020-11-27T01:39:29.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T18:11:11.000Z (about 2 years ago)
- Last Synced: 2024-10-24T15:54:57.841Z (12 months ago)
- Topics: changeset, changesets, npm-package, unity, unity3d, version, versions
- Language: TypeScript
- Homepage:
- Size: 163 KB
- Stars: 31
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
unity-changeset
===Get/List Unity editor changeset
[](https://deno.land/x/unity_changeset)
[](https://www.npmjs.com/package/unity-changeset)



[](https://github.com/semantic-release/semantic-release)
## Usage as a node module
Requirement: NodeJs 14 or later
### Install
```sh
npm install unity-changeset
```### Import
```js
// javascript
const { getUnityChangeset, scrapeArchivedChangesets, scrapeBetaChangesets } = require('unity-changeset');
// or, typescript
const { getUnityChangeset, scrapeArchivedChangesets, scrapeBetaChangesets } = from 'unity-changeset';
```### Example
```js
const { getUnityChangeset, scrapeArchivedChangesets, scrapeBetaChangesets } = require('unity-changeset');(async () => {
const changeset = await getUnityChangeset('2020.1.14f1');
console.log(changeset);
//=> UnityChangeset {version: '2020.1.14f1', changeset: 'd81f64f5201d'}
console.log(changeset.toString());
//=> 2020.1.14f1 d81f64f5201d
const changesets = await scrapeArchivedChangesets();
console.dir(changesets);
//=> [
// UnityChangeset { version: '2020.1.15f1', changeset: '97d0ae02d19d' },
// UnityChangeset { version: '2020.1.14f1', changeset: 'd81f64f5201d' },
// UnityChangeset { version: '2020.1.13f1', changeset: '5e24f28bfbc0' },
// ...
// ]
const betaChangesets = await scrapeBetaChangesets();
console.log(betaChangesets);
//=> [
// UnityChangeset { version: '2020.2.0b13', changeset: '655e1a328b90' },
// UnityChangeset { version: '2020.2.0b12', changeset: '92852ae685d8' },
// UnityChangeset { version: '2020.2.0b11', changeset: 'c499c2bf2e80' },
// ...
// ]
})();
```## Usage as a deno module
```js
const { getUnityChangeset, scrapeArchivedChangesets, scrapeBetaChangesets } = from 'https://deno.land/x/unity_changeset/src/index.ts';// or, specific version
const { getUnityChangeset, scrapeArchivedChangesets, scrapeBetaChangesets } = from 'https://deno.land/x/unity_changeset@2.0.0/src/index.ts';
```
## Usage as a command-line utility
### Install
```sh
# Requirement: NodeJs 14 or later
npm install -g unity-changeset# Use without installation
npx unity-changeset ...
```or
```
deno install -A -f -n unity-changeset https://deno.land/x/unity_changeset/src/cli.ts
```### Help
```
Usage: unity-changesetDescription:
Find Unity changesets.
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
``````
Usage: unity-changeset listDescription:
List Unity changesets.
Options:
-h, --help - Show this help.
Search options:
--all - Search all changesets (alpha/beta included)
--pre-release, --beta - Search only pre-release (alpha/beta) changesets
--lts - Only the LTS versions
--xlts - Only the LTS/XLTS versions (require 'Enterprise' or 'Industry' license to install XLTS version)Filter options:
--min - Minimum version (included)
--max - Maximum version (included)
--grep - Regular expression (e.g. '20(18|19).4.*')
--latest-lifecycle - Only the latest lifecycle (default)
--all-lifecycles - All lifecyclesGroup options:
--latest-patch - The latest patch versions only
--oldest-patch - The oldest patch versions in lateat lifecycle only (Conflicts: --latest-patch)Output options:
--version-only, --versions - Outputs only the version (no changesets)
--minor-version-only, --minor-versions - Outputs only the minor version (no changesets)
--json - Output in json format
--pretty-json - Output in pretty json format
```### Get a changeset for specific version:
```sh
$ unity-changeset 2020.2.14f1
d81f64f5201d
```### Get a changeset for specific version
```sh
$ unity-changeset list
2020.1.14f1 d81f64f5201d
2020.1.13f1 5e24f28bfbc0
2020.1.12f1 55b56f0a86e3
...# List changesets in json format:
$ unity-changeset list --json
[{"version":"2020.1.15f1","changeset":"97d0ae02d19d"},{"version":"2020.1.14f1","changeset":"d81f64f5201d"},...]# List changesets in pretty json format:
$ unity-changeset list --pretty-json
[
{
"version": "2020.1.15f1",
"changeset": "97d0ae02d19d"
},
{
"version": "2020.1.14f1",
"changeset": "d81f64f5201d"
},
...
]# List changesets (alpha/beta):
$ unity-changeset list --beta
2020.2.0b13 655e1a328b90
2020.2.0b12 92852ae685d8
2020.2.0b11 c499c2bf2e80
...# List changesets (all):
$ unity-changeset list --all
2020.2.0b13 655e1a328b90
2020.2.0b12 92852ae685d8
...
2020.1.14f1 d81f64f5201d
2020.1.13f1 5e24f28bfbc0
...# List the available Unity versions:
$ unity-changeset list --versions
2020.1.14f1
2020.1.13f1
2020.1.12f1
...# List the available Unity versions (alpha/beta):
$ unity-changeset list --beta --versions
2020.2.0b13
2020.2.0b12
2020.2.0b11
...# List Unity 2018.3 or later, and 2019.1 or earlier:
$ unity-changeset list --min 2018.3 --max 2019.1
2019.1.14f1 148b5891095a
...
2018.3.1f1 bb579dc42f1d
2018.3.0f2 6e9a27477296# List all Unity 2018.3 versions:
$ unity-changeset list --grep 2018.3
2018.3.14f1 d0e9f15437b1
2018.3.13f1 06548a9e9582
...
2018.3.1f1 bb579dc42f1d
2018.3.0f2 6e9a27477296# List the available Unity minor versions:
$ unity-changeset list --minor-versions
2020.1
...
2017.2
2017.1# List the latest Unity patch versions:
$ unity-changeset list --latest-patch
2020.1.14f1 d81f64f5201d
...
2017.2.5f1 588dc79c95ed
2017.1.5f1 9758a36cfaa6
```### Install a specific version of Unity via UnityHub
```sh
# /path/to/unity/hub:
# Windows: C:\\Program\ Files\\Unity\ Hub\\Unity\ Hub.exe
# MacOS: /Applications/Unity\ Hub.app/Contents/MacOS/Unity\ Hub# Show UnityHub help:
$ /path/to/unity/hub -- --headless help# Install Unity 2020.1.15f1 with modules for iOS and Android:
$ /path/to/unity/hub -- --headless install \
--version 2020.1.15f1 \
--changeset `unity-changeset 2020.1.15f1` \
--module ios,android
```
## Contributing
### Issues
Issues are very valuable to this project.
- Ideas are a valuable source of contributions others can make
- Problems show where this project is lacking
- With a question you show where contributors can improve the user experience### Pull Requests
Pull requests are, a great way to get your ideas into this repository.
### Support
This is an open source project that I am developing in my spare time.
If you like it, please support me.
With your support, I can spend more time on development. :)[](https://github.com/users/mob-sakai/sponsorship)
## License
* MIT
## Author
*  [mob-sakai](https://github.com/mob-sakai) [](https://twitter.com/intent/follow?screen_name=mob_sakai) 
## See Also
* GitHub page : https://github.com/mob-sakai/unity-changeset
* Releases : https://github.com/mob-sakai/unity-changeset/releases
* Issue tracker : https://github.com/mob-sakai/unity-changeset/issues
* Change log : https://github.com/mob-sakai/unity-changeset/blob/main/CHANGELOG.md