mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-02-05 12:36:37 +08:00
Get unityVersion from ProjectVersion.txt (#84)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { getInput } from '@actions/core';
|
||||
import { includes } from 'lodash-es';
|
||||
import UnityVersionParser from './unity-version-parser';
|
||||
|
||||
class Input {
|
||||
static get testModes() {
|
||||
@@ -14,7 +15,7 @@ class Input {
|
||||
|
||||
static getFromUser() {
|
||||
// Input variables specified in workflow using "with" prop.
|
||||
const unityVersion = getInput('unityVersion') || '2019.2.11f1';
|
||||
const rawUnityVersion = getInput('unityVersion') || 'auto';
|
||||
const customImage = getInput('customImage') || '';
|
||||
const testMode = getInput('testMode') || 'all';
|
||||
const rawProjectPath = getInput('projectPath') || '.';
|
||||
@@ -43,6 +44,8 @@ class Input {
|
||||
const projectPath = rawProjectPath.replace(/\/$/, '');
|
||||
const artifactsPath = rawArtifactsPath.replace(/\/$/, '');
|
||||
const useHostNetwork = rawUseHostNetwork === 'true';
|
||||
const unityVersion =
|
||||
rawUnityVersion === 'auto' ? UnityVersionParser.read(projectPath) : rawUnityVersion;
|
||||
|
||||
// Return sanitised input
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user