Compare commits

...

4 Commits

Author SHA1 Message Date
Webber Takken
9fff362775 Remove -nographics flag, ensure single -batchmode flag (#261)
* Remove -nographics flag, ensure -batchmode

* Remove explicit batch mode

* Add libnotify4 and bin for notify-send

* non-interactive frontend

* Move docker changes to base image (docker repo)
2021-05-22 21:07:54 +02:00
Zhou Xinwei
f0e18ea3a5 Fixed addressable build failing on Addressable 1.17.17+ (#262) 2021-05-20 17:51:54 +02:00
Webber Takken
947c8b8e20 Fix typo in issue template (#260) 2021-05-13 14:03:00 +02:00
Webber Takken
a5de621fe2 Ensure proper read permissions and cleanup build.sh (#259)
* Add linux read permissions and cleanup build.sh

* More verbose dirty branch

* Simplify added verbosity
2021-05-10 01:08:53 +02:00
8 changed files with 50 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest an improvement or now feature
about: Suggest an improvement, or a new feature
title: ''
labels: ''
assignees: ''

View File

@@ -53,14 +53,11 @@ namespace UnityBuilderAction
if (addressableAssetSettingsType != null)
{
// ReSharper disable once PossibleNullReferenceException, used from try-catch
void CallAddressablesMethod(string methodName, object[] args) => addressableAssetSettingsType
.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public)
.Invoke(null, args);
try
{
CallAddressablesMethod("CleanPlayerContent", new object[] { null });
CallAddressablesMethod("BuildPlayerContent", Array.Empty<object>());
addressableAssetSettingsType.GetMethod("CleanPlayerContent", BindingFlags.Static | BindingFlags.Public)
.Invoke(null, new object[] {null});
addressableAssetSettingsType.GetMethod("BuildPlayerContent", new Type[0]).Invoke(null, new object[0]);
}
catch (Exception e)
{

7
dist/index.js generated vendored
View File

@@ -2169,7 +2169,12 @@ class Versioning {
static isDirty() {
return __awaiter(this, void 0, void 0, function* () {
const output = yield this.git(['status', '--porcelain']);
return output !== '';
const isDirty = output !== '';
if (isDirty) {
core.warning('Changes were made to the following files and folders:\n');
core.warning(output);
}
return isDirty;
});
}
/**

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -25,7 +25,6 @@ if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
# Activate license
ACTIVATION_OUTPUT=$(unity-editor \
-nographics \
-logFile /dev/stdout \
-quit \
-manualLicenseFile $FILE_PATH)
@@ -62,8 +61,6 @@ elif [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
# Activate license
unity-editor \
-batchmode \
-nographics \
-logFile /dev/stdout \
-quit \
-serial "$UNITY_SERIAL" \

51
dist/steps/build.sh vendored
View File

@@ -65,6 +65,7 @@ fi
#
# Create Android keystore, if needed
#
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
echo "Not creating Android keystore."
else
@@ -73,16 +74,16 @@ else
fi
#
# Display custom parameters
# Pre-build debug information
#
echo "Using custom parameters $CUSTOM_PARAMETERS."
# The build specification below may require Unity 2019.2.11f1 or later (not tested below).
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
echo ""
echo "###########################"
echo "# Custom parameters #"
echo "###########################"
echo ""
#
# Build info
#
echo "$CUSTOM_PARAMETERS"
echo ""
echo "###########################"
@@ -100,16 +101,21 @@ echo "# Project directory #"
echo "###########################"
echo ""
ls -alh $UNITY_PROJECT_PATH
ls -alh "$UNITY_PROJECT_PATH"
#
# Build
#
echo ""
echo "###########################"
echo "# Building platform #"
echo "# Building project #"
echo "###########################"
echo ""
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
unity-editor \
-nographics \
-logfile /dev/stdout \
-quit \
-customBuildName "$BUILD_NAME" \
@@ -136,17 +142,24 @@ else
echo "Build failed, with exit code $BUILD_EXIT_CODE";
fi
# Add permissions to make app runnable
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
ADD_PERMISSIONS_PATH=$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*
echo "Making the following path executable: $ADD_PERMISSIONS_PATH"
chmod +x $ADD_PERMISSIONS_PATH
#
# Permissions
#
# Make a given user owner of all artifacts
if [[ -n "$CHOWN_FILES_TO" ]]; then
chown -R "$CHOWN_FILES_TO" "$BUILD_PATH_FULL"
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
fi
# Add read permissions for everyone to all artifacts
chmod -R a+r "$BUILD_PATH_FULL"
chmod -R a+r "$UNITY_PROJECT_PATH"
if [[ -n "$CHOWN_FILES_TO" ]]; then
chown -R $CHOWN_FILES_TO $BUILD_PATH_FULL
chown -R $CHOWN_FILES_TO $UNITY_PROJECT_PATH
# Add execute permissions to specific files
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*"
chmod +x "$OSX_EXECUTABLE_PATH"
fi
#
@@ -155,7 +168,7 @@ fi
echo ""
echo "###########################"
echo "# Build directory #"
echo "# Build output #"
echo "###########################"
echo ""

View File

@@ -7,7 +7,6 @@ if [[ -n "$UNITY_SERIAL" ]]; then
# This will return the license that is currently in use.
#
unity-editor \
-nographics \
-logFile /dev/stdout \
-quit \
-returnlicense

View File

@@ -251,8 +251,14 @@ export default class Versioning {
*/
static async isDirty() {
const output = await this.git(['status', '--porcelain']);
const isDirty = output !== '';
return output !== '';
if (isDirty) {
core.warning('Changes were made to the following files and folders:\n');
core.warning(output);
}
return isDirty;
}
/**