K8s support for test logging
commit
90a669d177
|
|
@ -0,0 +1 @@
|
||||||
|
_
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
||||||
|
yarn test
|
||||||
|
yarn build
|
||||||
|
git add dist/index.*
|
||||||
|
|
@ -107,6 +107,10 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'The android keyaliasPass'
|
description: 'The android keyaliasPass'
|
||||||
|
androidTargetSdkVersion:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: 'The android target API level.'
|
||||||
customParameters:
|
customParameters:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
@ -119,6 +123,11 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'SSH Agent path to forward to the container'
|
description: 'SSH Agent path to forward to the container'
|
||||||
|
gitPrivateToken:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: >
|
||||||
|
Github private token to pull from github
|
||||||
chownFilesTo:
|
chownFilesTo:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace UnityBuilderAction.Input
|
namespace UnityBuilderAction.Input
|
||||||
|
|
@ -16,6 +17,8 @@ namespace UnityBuilderAction.Input
|
||||||
PlayerSettings.Android.keyaliasName = keyaliasName;
|
PlayerSettings.Android.keyaliasName = keyaliasName;
|
||||||
if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass))
|
if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass))
|
||||||
PlayerSettings.Android.keyaliasPass = keyaliasPass;
|
PlayerSettings.Android.keyaliasPass = keyaliasPass;
|
||||||
|
if (options.TryGetValue("androidTargetSdkVersion", out string androidTargetSdkVersion) && !string.IsNullOrEmpty(androidTargetSdkVersion))
|
||||||
|
PlayerSettings.Android.targetSdkVersion = (AndroidSdkVersions) Enum.Parse(typeof(AndroidSdkVersions), androidTargetSdkVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,12 @@ namespace UnityBuilderAction.Versioning
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetAndroidVersionCode(string androidVersionCode) {
|
public static void SetAndroidVersionCode(string androidVersionCode) {
|
||||||
PlayerSettings.Android.bundleVersionCode = Int32.Parse(androidVersionCode);
|
int bundleVersionCode = Int32.Parse(androidVersionCode);
|
||||||
|
if (bundleVersionCode <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerSettings.Android.bundleVersionCode = bundleVersionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Apply(string version)
|
static void Apply(string version)
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,26 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create directory for license activation
|
||||||
|
#
|
||||||
|
|
||||||
|
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license"
|
||||||
|
mkdir -p "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run steps
|
# Run steps
|
||||||
#
|
#
|
||||||
|
source /steps/set_gitcredential.sh
|
||||||
source /steps/activate.sh
|
source /steps/activate.sh
|
||||||
source /steps/build.sh
|
source /steps/build.sh
|
||||||
source /steps/return_license.sh
|
source /steps/return_license.sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remove license activation directory
|
||||||
|
#
|
||||||
|
|
||||||
|
rm -r "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Instructions for debugging
|
# Instructions for debugging
|
||||||
#
|
#
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -1952,7 +1952,203 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
json-schema
|
json-schema
|
||||||
AFLv2.1
|
(AFL-2.1 OR BSD-3-Clause)
|
||||||
|
Dojo is available under *either* the terms of the BSD 3-Clause "New" License *or* the
|
||||||
|
Academic Free License version 2.1. As a recipient of Dojo, you may choose which
|
||||||
|
license to receive this code under (except as noted in per-module LICENSE
|
||||||
|
files). Some modules may not be the copyright of the Dojo Foundation. These
|
||||||
|
modules contain explicit declarations of copyright in both the LICENSE files in
|
||||||
|
the directories in which they reside and in the code itself. No external
|
||||||
|
contributions are allowed under licenses which are fundamentally incompatible
|
||||||
|
with the AFL-2.1 OR and BSD-3-Clause licenses that Dojo is distributed under.
|
||||||
|
|
||||||
|
The text of the AFL-2.1 and BSD-3-Clause licenses is reproduced below.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
BSD 3-Clause "New" License:
|
||||||
|
**********************
|
||||||
|
|
||||||
|
Copyright (c) 2005-2015, The Dojo Foundation
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the Dojo Foundation nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this software
|
||||||
|
without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
The Academic Free License, v. 2.1:
|
||||||
|
**********************************
|
||||||
|
|
||||||
|
This Academic Free License (the "License") applies to any original work of
|
||||||
|
authorship (the "Original Work") whose owner (the "Licensor") has placed the
|
||||||
|
following notice immediately following the copyright notice for the Original
|
||||||
|
Work:
|
||||||
|
|
||||||
|
Licensed under the Academic Free License version 2.1
|
||||||
|
|
||||||
|
1) Grant of Copyright License. Licensor hereby grants You a world-wide,
|
||||||
|
royalty-free, non-exclusive, perpetual, sublicenseable license to do the
|
||||||
|
following:
|
||||||
|
|
||||||
|
a) to reproduce the Original Work in copies;
|
||||||
|
|
||||||
|
b) to prepare derivative works ("Derivative Works") based upon the Original
|
||||||
|
Work;
|
||||||
|
|
||||||
|
c) to distribute copies of the Original Work and Derivative Works to the
|
||||||
|
public;
|
||||||
|
|
||||||
|
d) to perform the Original Work publicly; and
|
||||||
|
|
||||||
|
e) to display the Original Work publicly.
|
||||||
|
|
||||||
|
2) Grant of Patent License. Licensor hereby grants You a world-wide,
|
||||||
|
royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
|
||||||
|
claims owned or controlled by the Licensor that are embodied in the Original
|
||||||
|
Work as furnished by the Licensor, to make, use, sell and offer for sale the
|
||||||
|
Original Work and Derivative Works.
|
||||||
|
|
||||||
|
3) Grant of Source Code License. The term "Source Code" means the preferred
|
||||||
|
form of the Original Work for making modifications to it and all available
|
||||||
|
documentation describing how to modify the Original Work. Licensor hereby
|
||||||
|
agrees to provide a machine-readable copy of the Source Code of the Original
|
||||||
|
Work along with each copy of the Original Work that Licensor distributes.
|
||||||
|
Licensor reserves the right to satisfy this obligation by placing a
|
||||||
|
machine-readable copy of the Source Code in an information repository
|
||||||
|
reasonably calculated to permit inexpensive and convenient access by You for as
|
||||||
|
long as Licensor continues to distribute the Original Work, and by publishing
|
||||||
|
the address of that information repository in a notice immediately following
|
||||||
|
the copyright notice that applies to the Original Work.
|
||||||
|
|
||||||
|
4) Exclusions From License Grant. Neither the names of Licensor, nor the names
|
||||||
|
of any contributors to the Original Work, nor any of their trademarks or
|
||||||
|
service marks, may be used to endorse or promote products derived from this
|
||||||
|
Original Work without express prior written permission of the Licensor. Nothing
|
||||||
|
in this License shall be deemed to grant any rights to trademarks, copyrights,
|
||||||
|
patents, trade secrets or any other intellectual property of Licensor except as
|
||||||
|
expressly stated herein. No patent license is granted to make, use, sell or
|
||||||
|
offer to sell embodiments of any patent claims other than the licensed claims
|
||||||
|
defined in Section 2. No right is granted to the trademarks of Licensor even if
|
||||||
|
such marks are included in the Original Work. Nothing in this License shall be
|
||||||
|
interpreted to prohibit Licensor from licensing under different terms from this
|
||||||
|
License any Original Work that Licensor otherwise would have a right to
|
||||||
|
license.
|
||||||
|
|
||||||
|
5) This section intentionally omitted.
|
||||||
|
|
||||||
|
6) Attribution Rights. You must retain, in the Source Code of any Derivative
|
||||||
|
Works that You create, all copyright, patent or trademark notices from the
|
||||||
|
Source Code of the Original Work, as well as any notices of licensing and any
|
||||||
|
descriptive text identified therein as an "Attribution Notice." You must cause
|
||||||
|
the Source Code for any Derivative Works that You create to carry a prominent
|
||||||
|
Attribution Notice reasonably calculated to inform recipients that You have
|
||||||
|
modified the Original Work.
|
||||||
|
|
||||||
|
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
|
||||||
|
the copyright in and to the Original Work and the patent rights granted herein
|
||||||
|
by Licensor are owned by the Licensor or are sublicensed to You under the terms
|
||||||
|
of this License with the permission of the contributor(s) of those copyrights
|
||||||
|
and patent rights. Except as expressly stated in the immediately proceeding
|
||||||
|
sentence, the Original Work is provided under this License on an "AS IS" BASIS
|
||||||
|
and WITHOUT WARRANTY, either express or implied, including, without limitation,
|
||||||
|
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
|
||||||
|
This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
|
||||||
|
license to Original Work is granted hereunder except under this disclaimer.
|
||||||
|
|
||||||
|
8) Limitation of Liability. Under no circumstances and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise, shall the
|
||||||
|
Licensor be liable to any person for any direct, indirect, special, incidental,
|
||||||
|
or consequential damages of any character arising as a result of this License
|
||||||
|
or the use of the Original Work including, without limitation, damages for loss
|
||||||
|
of goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses. This limitation of liability shall not
|
||||||
|
apply to liability for death or personal injury resulting from Licensor's
|
||||||
|
negligence to the extent applicable law prohibits such limitation. Some
|
||||||
|
jurisdictions do not allow the exclusion or limitation of incidental or
|
||||||
|
consequential damages, so this exclusion and limitation may not apply to You.
|
||||||
|
|
||||||
|
9) Acceptance and Termination. If You distribute copies of the Original Work or
|
||||||
|
a Derivative Work, You must make a reasonable effort under the circumstances to
|
||||||
|
obtain the express assent of recipients to the terms of this License. Nothing
|
||||||
|
else but this License (or another written agreement between Licensor and You)
|
||||||
|
grants You permission to create Derivative Works based upon the Original Work
|
||||||
|
or to exercise any of the rights granted in Section 1 herein, and any attempt
|
||||||
|
to do so except under the terms of this License (or another written agreement
|
||||||
|
between Licensor and You) is expressly prohibited by U.S. copyright law, the
|
||||||
|
equivalent laws of other countries, and by international treaty. Therefore, by
|
||||||
|
exercising any of the rights granted to You in Section 1 herein, You indicate
|
||||||
|
Your acceptance of this License and all of its terms and conditions.
|
||||||
|
|
||||||
|
10) Termination for Patent Action. This License shall terminate automatically
|
||||||
|
and You may no longer exercise any of the rights granted to You by this License
|
||||||
|
as of the date You commence an action, including a cross-claim or counterclaim,
|
||||||
|
against Licensor or any licensee alleging that the Original Work infringes a
|
||||||
|
patent. This termination provision shall not apply for an action alleging
|
||||||
|
patent infringement by combinations of the Original Work with other software or
|
||||||
|
hardware.
|
||||||
|
|
||||||
|
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
|
||||||
|
License may be brought only in the courts of a jurisdiction wherein the
|
||||||
|
Licensor resides or in which Licensor conducts its primary business, and under
|
||||||
|
the laws of that jurisdiction excluding its conflict-of-law provisions. The
|
||||||
|
application of the United Nations Convention on Contracts for the International
|
||||||
|
Sale of Goods is expressly excluded. Any use of the Original Work outside the
|
||||||
|
scope of this License or after its termination shall be subject to the
|
||||||
|
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
|
||||||
|
seq., the equivalent laws of other countries, and international treaty. This
|
||||||
|
section shall survive the termination of this License.
|
||||||
|
|
||||||
|
12) Attorneys Fees. In any action to enforce the terms of this License or
|
||||||
|
seeking damages relating thereto, the prevailing party shall be entitled to
|
||||||
|
recover its costs and expenses, including, without limitation, reasonable
|
||||||
|
attorneys' fees and costs incurred in connection with such action, including
|
||||||
|
any appeal of such action. This section shall survive the termination of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
13) Miscellaneous. This License represents the complete agreement concerning
|
||||||
|
the subject matter hereof. If any provision of this License is held to be
|
||||||
|
unenforceable, such provision shall be reformed only to the extent necessary to
|
||||||
|
make it enforceable.
|
||||||
|
|
||||||
|
14) Definition of "You" in This License. "You" throughout this License, whether
|
||||||
|
in upper or lower case, means an individual or a legal entity exercising rights
|
||||||
|
under, and complying with all of the terms of, this License. For legal
|
||||||
|
entities, "You" includes any entity that controls, is controlled by, or is
|
||||||
|
under common control with you. For purposes of this definition, "control" means
|
||||||
|
(i) the power, direct or indirect, to cause the direction or management of such
|
||||||
|
entity, whether by contract or otherwise, or (ii) ownership of fifty percent
|
||||||
|
(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
|
||||||
|
entity.
|
||||||
|
|
||||||
|
15) Right to Use. You may use the Original Work in all ways not otherwise
|
||||||
|
restricted or conditioned by this License or by law, and Licensor promises not
|
||||||
|
to interfere with or be responsible for such uses by You.
|
||||||
|
|
||||||
|
This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
|
||||||
|
Permission is hereby granted to copy and distribute this license without
|
||||||
|
modification. This license may not be modified without the express written
|
||||||
|
permission of its copyright owner.
|
||||||
|
|
||||||
|
|
||||||
json-schema-traverse
|
json-schema-traverse
|
||||||
MIT
|
MIT
|
||||||
|
|
@ -2147,7 +2343,7 @@ mimic-response
|
||||||
MIT
|
MIT
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
||||||
#
|
#
|
||||||
# PERSONAL LICENSE MODE
|
# PERSONAL LICENSE MODE
|
||||||
|
|
@ -78,7 +82,7 @@ else
|
||||||
#
|
#
|
||||||
echo "License activation strategy could not be determined."
|
echo "License activation strategy could not be determined."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Visit https://github.com/webbertakken/unity-builder#usage for more"
|
echo "Visit https://game.ci/docs/github/getting-started for more"
|
||||||
echo "details on how to set up one of the possible activation strategies."
|
echo "details on how to set up one of the possible activation strategies."
|
||||||
|
|
||||||
# Immediately exit as no UNITY_EXIT_CODE can be derrived.
|
# Immediately exit as no UNITY_EXIT_CODE can be derrived.
|
||||||
|
|
@ -98,3 +102,6 @@ else
|
||||||
echo "Exit code was: $UNITY_EXIT_CODE"
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
exit $UNITY_EXIT_CODE
|
exit $UNITY_EXIT_CODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
|
|
|
||||||
|
|
@ -63,14 +63,24 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create Android keystore, if needed
|
# Prepare Android keystore and SDK, if needed
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_KEYSTORE_NAME" && -n "$ANDROID_KEYSTORE_BASE64" ]]; then
|
||||||
echo "Not creating Android keystore."
|
echo "Creating Android keystore."
|
||||||
else
|
|
||||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
|
||||||
echo "Created Android keystore."
|
echo "Created Android keystore."
|
||||||
|
else
|
||||||
|
echo "Not creating Android keystore."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_SDK_MANAGER_PARAMETERS" ]]; then
|
||||||
|
echo "Updating Android SDK with parameters: $ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
export JAVA_HOME="$(awk -F'=' '/JAVA_HOME=/{print $2}' /usr/bin/unity-editor.d/*)"
|
||||||
|
"$(awk -F'=' '/ANDROID_HOME=/{print $2}' /usr/bin/unity-editor.d/*)/tools/bin/sdkmanager" "$ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
echo "Updated Android SDK."
|
||||||
|
else
|
||||||
|
echo "Not updating Android SDK."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -130,6 +140,7 @@ unity-editor \
|
||||||
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
|
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
|
||||||
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
|
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
|
||||||
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
|
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
|
||||||
|
-androidTargetSdkVersion "$ANDROID_TARGET_SDK_VERSION" \
|
||||||
$CUSTOM_PARAMETERS
|
$CUSTOM_PARAMETERS
|
||||||
|
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
|
|
@ -158,8 +169,8 @@ chmod -R a+r "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
# Add execute permissions to specific files
|
# Add execute permissions to specific files
|
||||||
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
||||||
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*"
|
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/$BUILD_NAME.app/Contents/MacOS"
|
||||||
chmod +x "$OSX_EXECUTABLE_PATH"
|
find "$OSX_EXECUTABLE_PATH" -type f -exec chmod +x {} \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
if [[ -n "$UNITY_SERIAL" ]]; then
|
if [[ -n "$UNITY_SERIAL" ]]; then
|
||||||
#
|
#
|
||||||
# PROFESSIONAL (SERIAL) LICENSE MODE
|
# PROFESSIONAL (SERIAL) LICENSE MODE
|
||||||
|
|
@ -11,3 +15,6 @@ if [[ -n "$UNITY_SERIAL" ]]; then
|
||||||
-quit \
|
-quit \
|
||||||
-returnlicense
|
-returnlicense
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "${GIT_PRIVATE_TOKEN}" ]
|
||||||
|
then
|
||||||
|
echo "GIT_PRIVATE_TOKEN unset skipping"
|
||||||
|
else
|
||||||
|
echo "GIT_PRIVATE_TOKEN is set configuring git credentials"
|
||||||
|
|
||||||
|
git config --global credential.helper store
|
||||||
|
git config --global --replace-all url.https://github.com/.insteadOf ssh://git@github.com/
|
||||||
|
git config --global --add url.https://github.com/.insteadOf git@github.com
|
||||||
|
|
||||||
|
git config --global url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "https://github.com/"
|
||||||
|
git config --global url."https://ssh:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://git@github.com/"
|
||||||
|
git config --global url."https://git:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "git@github.com:"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "---------- git config --list -------------"
|
||||||
|
git config --list
|
||||||
|
|
||||||
|
echo "---------- git config --list --show-origin -------------"
|
||||||
|
git config --list --show-origin
|
||||||
|
|
||||||
23
package.json
23
package.json
|
|
@ -12,7 +12,8 @@
|
||||||
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
||||||
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"cli": "npx ts-node src/index.ts"
|
"cli": "npx ts-node src/index.ts",
|
||||||
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.2.6",
|
||||||
|
|
@ -27,13 +28,15 @@
|
||||||
"nanoid": "3.1.20",
|
"nanoid": "3.1.20",
|
||||||
"reflect-metadata": "^0.1.13",
|
"reflect-metadata": "^0.1.13",
|
||||||
"rxjs": "^7.4.0",
|
"rxjs": "^7.4.0",
|
||||||
"semver": "^7.3.2",
|
"semver": "^7.3.5",
|
||||||
"yaml": "^1.10.2"
|
"yaml": "^1.10.2",
|
||||||
|
"@octokit/core": "^3.5.1",
|
||||||
|
"kubernetes-client": "^9.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.0.3",
|
"@types/jest": "^27.0.3",
|
||||||
"@types/node": "^14.14.9",
|
"@types/node": "^14.14.9",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/semver": "^7.3.5",
|
||||||
"@typescript-eslint/parser": "^4.8.1",
|
"@typescript-eslint/parser": "^4.8.1",
|
||||||
"@vercel/ncc": "^0.25.1",
|
"@vercel/ncc": "^0.25.1",
|
||||||
"eslint": "^7.17.0",
|
"eslint": "^7.17.0",
|
||||||
|
|
@ -42,20 +45,15 @@
|
||||||
"eslint-plugin-jest": "^24.1.3",
|
"eslint-plugin-jest": "^24.1.3",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
"eslint-plugin-unicorn": "^28.0.2",
|
"eslint-plugin-unicorn": "^28.0.2",
|
||||||
"husky": "4.2.5",
|
"husky": "^7.0.4",
|
||||||
"jest": "^26.6.3",
|
"jest": "^26.6.3",
|
||||||
"jest-circus": "^26.6.3",
|
"jest-circus": "^26.6.3",
|
||||||
"js-yaml": "^3.14.0",
|
"js-yaml": "^3.14.0",
|
||||||
"lint-staged": "^10.5.4",
|
"lint-staged": "^12.1.2",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"ts-jest": "^26.4.2",
|
"ts-jest": "^26.4.2",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
},
|
},
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "lint-staged && yarn build && git add dist/index.*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,ts,tsx}": [
|
"*.{js,jsx,ts,tsx}": [
|
||||||
"prettier --write",
|
"prettier --write",
|
||||||
|
|
@ -69,6 +67,7 @@
|
||||||
],
|
],
|
||||||
"*.sh": [
|
"*.sh": [
|
||||||
"git update-index --chmod=+x"
|
"git update-index --chmod=+x"
|
||||||
]
|
],
|
||||||
|
"*.js": "eslint --cache --fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ export const mockGetFromUser = jest.fn().mockResolvedValue({
|
||||||
customParameters: '',
|
customParameters: '',
|
||||||
sshAgent: '',
|
sshAgent: '',
|
||||||
chownFilesTo: '',
|
chownFilesTo: '',
|
||||||
|
gitPrivateToken: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,10 @@ import AndroidVersioning from './android-versioning';
|
||||||
|
|
||||||
describe('Android Versioning', () => {
|
describe('Android Versioning', () => {
|
||||||
describe('versionToVersionCode', () => {
|
describe('versionToVersionCode', () => {
|
||||||
|
it('defaults to 0 when versioning strategy is none', () => {
|
||||||
|
expect(AndroidVersioning.versionToVersionCode('none')).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
it('defaults to 1 when version is not a valid semver', () => {
|
it('defaults to 1 when version is not a valid semver', () => {
|
||||||
expect(AndroidVersioning.versionToVersionCode('abcd')).toBe(1);
|
expect(AndroidVersioning.versionToVersionCode('abcd')).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
@ -11,7 +15,7 @@ describe('Android Versioning', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('throw when generated version code is too large', () => {
|
it('throw when generated version code is too large', () => {
|
||||||
expect(() => AndroidVersioning.versionToVersionCode('1234.0.0')).toThrow();
|
expect(() => AndroidVersioning.versionToVersionCode('2050.0.0')).toThrow();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -24,4 +28,14 @@ describe('Android Versioning', () => {
|
||||||
expect(AndroidVersioning.determineVersionCode('1.2.3', 2)).toBe(2);
|
expect(AndroidVersioning.determineVersionCode('1.2.3', 2)).toBe(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('determineSdkManagerParameters', () => {
|
||||||
|
it('defaults to blank', () => {
|
||||||
|
expect(AndroidVersioning.determineSdkManagerParameters('AndroidApiLevelAuto')).toBe('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses the specified api level', () => {
|
||||||
|
expect(AndroidVersioning.determineSdkManagerParameters('AndroidApiLevel30')).toBe('platforms;android-30');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@ export default class AndroidVersioning {
|
||||||
}
|
}
|
||||||
|
|
||||||
static versionToVersionCode(version) {
|
static versionToVersionCode(version) {
|
||||||
|
if (version === 'none') {
|
||||||
|
core.info(`Versioning strategy is set to ${version}, so android version code should not be applied.`);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const parsedVersion = semver.parse(version);
|
const parsedVersion = semver.parse(version);
|
||||||
|
|
||||||
if (!parsedVersion) {
|
if (!parsedVersion) {
|
||||||
|
|
@ -21,7 +26,7 @@ export default class AndroidVersioning {
|
||||||
// Allow for 3 patch digits, 3 minor digits and 3 major digits.
|
// Allow for 3 patch digits, 3 minor digits and 3 major digits.
|
||||||
const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;
|
const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;
|
||||||
|
|
||||||
if (versionCode >= 1000000000) {
|
if (versionCode >= 2050000000) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`,
|
`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`,
|
||||||
);
|
);
|
||||||
|
|
@ -29,4 +34,9 @@ export default class AndroidVersioning {
|
||||||
core.info(`Using android versionCode ${versionCode}`);
|
core.info(`Using android versionCode ${versionCode}`);
|
||||||
return versionCode;
|
return versionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static determineSdkManagerParameters(targetSdkVersion) {
|
||||||
|
const parsedVersion = Number.parseInt(targetSdkVersion.slice(-2), 10);
|
||||||
|
return Number.isNaN(parsedVersion) ? '' : `platforms;android-${parsedVersion}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import Versioning from './versioning';
|
import Versioning from './versioning';
|
||||||
import UnityVersioning from './unity-versioning';
|
import UnityVersioning from './unity-versioning';
|
||||||
|
import AndroidVersioning from './android-versioning';
|
||||||
import BuildParameters from './build-parameters';
|
import BuildParameters from './build-parameters';
|
||||||
import Input from './input';
|
import Input from './input';
|
||||||
import Platform from './platform';
|
import Platform from './platform';
|
||||||
|
|
@ -10,6 +11,10 @@ const determineUnityVersion = jest
|
||||||
.spyOn(UnityVersioning, 'determineUnityVersion')
|
.spyOn(UnityVersioning, 'determineUnityVersion')
|
||||||
.mockImplementation(() => '2019.2.11f1');
|
.mockImplementation(() => '2019.2.11f1');
|
||||||
|
|
||||||
|
const determineSdkManagerParameters = jest
|
||||||
|
.spyOn(AndroidVersioning, 'determineSdkManagerParameters')
|
||||||
|
.mockImplementation(() => 'platforms;android-30');
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
@ -44,6 +49,11 @@ describe('BuildParameters', () => {
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidVersionCode: 1003037 }));
|
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidVersionCode: 1003037 }));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('determines the android sdk manager parameters only once', async () => {
|
||||||
|
await BuildParameters.create();
|
||||||
|
expect(determineSdkManagerParameters).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
it('returns the platform', async () => {
|
it('returns the platform', async () => {
|
||||||
const mockValue = 'somePlatform';
|
const mockValue = 'somePlatform';
|
||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockValue);
|
||||||
|
|
@ -154,6 +164,14 @@ describe('BuildParameters', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('returns the android target sdk version', async () => {
|
||||||
|
const mockValue = 'AndroidApiLevelAuto';
|
||||||
|
jest.spyOn(Input, 'androidTargetSdkVersion', 'get').mockReturnValue(mockValue);
|
||||||
|
await expect(BuildParameters.create()).resolves.toEqual(
|
||||||
|
expect.objectContaining({ androidTargetSdkVersion: mockValue }),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it('returns the custom parameters', async () => {
|
it('returns the custom parameters', async () => {
|
||||||
const mockValue = '-profile SomeProfile -someBoolean -someValue exampleValue';
|
const mockValue = '-profile SomeProfile -someBoolean -someValue exampleValue';
|
||||||
jest.spyOn(Input, 'customParameters', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'customParameters', 'get').mockReturnValue(mockValue);
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,15 @@ class BuildParameters {
|
||||||
public androidKeystorePass!: string;
|
public androidKeystorePass!: string;
|
||||||
public androidKeyaliasName!: string;
|
public androidKeyaliasName!: string;
|
||||||
public androidKeyaliasPass!: string;
|
public androidKeyaliasPass!: string;
|
||||||
|
public androidTargetSdkVersion!: string;
|
||||||
|
public androidSdkManagerParameters!: string;
|
||||||
public customParameters!: string;
|
public customParameters!: string;
|
||||||
public sshAgent!: string;
|
public sshAgent!: string;
|
||||||
public cloudRunnerCluster!: string;
|
public cloudRunnerCluster!: string;
|
||||||
public awsBaseStackName!: string;
|
public awsBaseStackName!: string;
|
||||||
|
public gitPrivateToken!: string;
|
||||||
|
public remoteBuildCluster!: string;
|
||||||
|
public awsStackName!: string;
|
||||||
public kubeConfig!: string;
|
public kubeConfig!: string;
|
||||||
public githubToken!: string;
|
public githubToken!: string;
|
||||||
public cloudRunnerMemory!: string;
|
public cloudRunnerMemory!: string;
|
||||||
|
|
@ -50,6 +55,8 @@ class BuildParameters {
|
||||||
|
|
||||||
const androidVersionCode = AndroidVersioning.determineVersionCode(buildVersion, Input.androidVersionCode);
|
const androidVersionCode = AndroidVersioning.determineVersionCode(buildVersion, Input.androidVersionCode);
|
||||||
|
|
||||||
|
const androidSdkManagerParameters = AndroidVersioning.determineSdkManagerParameters(Input.androidTargetSdkVersion);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
version: unityVersion,
|
version: unityVersion,
|
||||||
customImage: Input.customImage,
|
customImage: Input.customImage,
|
||||||
|
|
@ -67,8 +74,11 @@ class BuildParameters {
|
||||||
androidKeystorePass: Input.androidKeystorePass,
|
androidKeystorePass: Input.androidKeystorePass,
|
||||||
androidKeyaliasName: Input.androidKeyaliasName,
|
androidKeyaliasName: Input.androidKeyaliasName,
|
||||||
androidKeyaliasPass: Input.androidKeyaliasPass,
|
androidKeyaliasPass: Input.androidKeyaliasPass,
|
||||||
|
androidTargetSdkVersion: Input.androidTargetSdkVersion,
|
||||||
|
androidSdkManagerParameters,
|
||||||
customParameters: Input.customParameters,
|
customParameters: Input.customParameters,
|
||||||
sshAgent: Input.sshAgent,
|
sshAgent: Input.sshAgent,
|
||||||
|
gitPrivateToken: Input.gitPrivateToken,
|
||||||
chownFilesTo: Input.chownFilesTo,
|
chownFilesTo: Input.chownFilesTo,
|
||||||
cloudRunnerCluster: Input.cloudRunnerCluster,
|
cloudRunnerCluster: Input.cloudRunnerCluster,
|
||||||
awsBaseStackName: Input.awsBaseStackName,
|
awsBaseStackName: Input.awsBaseStackName,
|
||||||
|
|
@ -85,6 +95,8 @@ class BuildParameters {
|
||||||
branch: Input.branch,
|
branch: Input.branch,
|
||||||
githubRepo: Input.githubRepo,
|
githubRepo: Input.githubRepo,
|
||||||
logToFile: false,
|
logToFile: false,
|
||||||
|
remoteBuildCluster: Input.cloudRunnerCluster,
|
||||||
|
awsStackName: Input.awsBaseStackName,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,19 @@ describe('Input', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('androidTargetSdkVersion', () => {
|
||||||
|
it('returns the default value', () => {
|
||||||
|
expect(Input.androidTargetSdkVersion).toStrictEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('takes input from the users workflow', () => {
|
||||||
|
const mockValue = 'secret';
|
||||||
|
const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue);
|
||||||
|
expect(Input.androidTargetSdkVersion).toStrictEqual(mockValue);
|
||||||
|
expect(spy).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('allowDirtyBuild', () => {
|
describe('allowDirtyBuild', () => {
|
||||||
it('returns the default value', () => {
|
it('returns the default value', () => {
|
||||||
expect(Input.allowDirtyBuild).toStrictEqual(false);
|
expect(Input.allowDirtyBuild).toStrictEqual(false);
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,10 @@ class Input {
|
||||||
return Input.getInput('androidKeyaliasPass') || '';
|
return Input.getInput('androidKeyaliasPass') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get androidTargetSdkVersion() {
|
||||||
|
return core.getInput('androidTargetSdkVersion') || '';
|
||||||
|
}
|
||||||
|
|
||||||
static get allowDirtyBuild() {
|
static get allowDirtyBuild() {
|
||||||
const input = Input.getInput('allowDirtyBuild') || false;
|
const input = Input.getInput('allowDirtyBuild') || false;
|
||||||
|
|
||||||
|
|
@ -130,6 +134,10 @@ class Input {
|
||||||
return Input.getInput('sshAgent') || '';
|
return Input.getInput('sshAgent') || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static get gitPrivateToken() {
|
||||||
|
return core.getInput('gitPrivateToken') || '';
|
||||||
|
}
|
||||||
|
|
||||||
static get chownFilesTo() {
|
static get chownFilesTo() {
|
||||||
return Input.getInput('chownFilesTo') || '';
|
return Input.getInput('chownFilesTo') || '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,13 @@ describe('Versioning', () => {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
test.each(['1.1-1-g12345678', '0.1-2-g12345678', '0.0-500-gA9B6C3D0-dirty'])(
|
||||||
|
'accepts valid semantic versions without v-prefix %s',
|
||||||
|
(description) => {
|
||||||
|
expect(Versioning.descriptionRegex1.test(description)).toBeTruthy();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
test.each(['v0', 'v0.1', 'v0.1.2', 'v0.1-2', 'v0.1-2-g'])('does not like %s', (description) => {
|
test.each(['v0', 'v0.1', 'v0.1.2', 'v0.1-2', 'v0.1-2-g'])('does not like %s', (description) => {
|
||||||
expect(Versioning.descriptionRegex1.test(description)).toBeFalsy();
|
expect(Versioning.descriptionRegex1.test(description)).toBeFalsy();
|
||||||
// Also never expect without the v to work for any of these cases.
|
// Also never expect without the v to work for any of these cases.
|
||||||
|
|
|
||||||
|
|
@ -68,15 +68,15 @@ export default class Versioning {
|
||||||
* Regex to parse version description into separate fields
|
* Regex to parse version description into separate fields
|
||||||
*/
|
*/
|
||||||
static get descriptionRegex1() {
|
static get descriptionRegex1() {
|
||||||
return /^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get descriptionRegex2() {
|
static get descriptionRegex2() {
|
||||||
return /^v([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get descriptionRegex3() {
|
static get descriptionRegex3() {
|
||||||
return /^v([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
return /^v?([\d.]+-\w+\.\d+)-(\d+)-g(\w+)-?(\w+)*/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
static async determineVersion(strategy: string, inputVersion: string) {
|
static async determineVersion(strategy: string, inputVersion: string) {
|
||||||
|
|
@ -265,7 +265,7 @@ export default class Versioning {
|
||||||
* Get the tag if there is one pointing at HEAD
|
* Get the tag if there is one pointing at HEAD
|
||||||
*/
|
*/
|
||||||
static async getTag() {
|
static async getTag() {
|
||||||
return this.git(['tag', '--points-at', 'HEAD']);
|
return (await this.git(['tag', '--points-at', 'HEAD'])).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue