Coder Social home page Coder Social logo

gmh5225 / get-unity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neogeek/get-unity

0.0 0.0 0.0 265 KB

๐Ÿ•น Command line tool for getting the download URL for the latest or specific version of Unity.

Home Page: https://get-unity.herokuapp.com/

License: MIT License

JavaScript 100.00%

get-unity's Introduction

get-unity

๐Ÿ•น Command line tool for getting the download URL for the latest or specific version of Unity.

NPM Version Tests Build status

Install

$ npm install -g get-unity

Usage

Get the download URL of the latest major release of Unity.

$ get-unity

Get the download URL of the latest minor release of Unity.

$ get-unity 2019.x

Get the download URL of the latest patch release of Unity.

$ get-unity 2019.2.x

Get the download URL of the version found in ProjectSettings/ProjectVersion.txt

$ get-unity --file=ProjectSettings/ProjectVersion.txt

Exporting URL to an enviroment variable.

$ UNITY_URL=$(get-unity --file=ProjectSettings/ProjectVersion.txt)
$ echo $UNITY_URL

Help

  Command line tool for getting the download URL for the latest or specific version of Unity.

  Usage
    $ get-unity <version> [options]

  Options
  --file, -f       Search file for Unity version number.
  --force, -r      Force update to local cache of editor versions.
  --offline, -o    Prevent request to update local cache of editor versions.
  --help, -h       Display this help message.
  --version, -v    Display the current installed version.

API

getUnityUrls(string filter [, string filePath])

const { getUnityUrls } = require('get-unity');

getUnityUrls('2019', './data/editor-installers.json').then(urls =>
  console.log(urls)
);

Output:

{
  "linux": "https://download.unity3d.com/download_unity/5f859a4cfee5/LinuxEditorInstaller/Unity.tar.xz",
  "mac": "https://download.unity3d.com/download_unity/5f859a4cfee5/MacEditorInstaller/Unity-2019.2.11f1.pkg",
  "win64": "https://download.unity3d.com/download_unity/5f859a4cfee5/Windows64EditorInstaller/UnitySetup64-2019.2.11f1.exe"
}

parseVersionFromString(string contents)

const { parsers } = require('get-unity');

console.log(
  parsers.parseVersionFromString(`m_EditorVersion: 2019.2.9f1
m_EditorVersionWithRevision: 2019.2.9f1 (ebce4d76e6e8)`)
);

Output:

2019.2.9f1

updateEditorInstallers([string filePath, int ttl])

const { updateEditorInstallers } = require('get-unity');

updateEditorInstallers('./data/editor-installers.json', 3600000).then(() =>
  console.log('Done')
);

get-unity's People

Contributors

neogeek avatar neogeek-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.