Ensure proper read permissions and cleanup build.sh (#259)
* Add linux read permissions and cleanup build.sh * More verbose dirty branch * Simplify added verbositypull/260/head
parent
e31af20466
commit
a5de621fe2
|
@ -2169,7 +2169,12 @@ class Versioning {
|
||||||
static isDirty() {
|
static isDirty() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const output = yield this.git(['status', '--porcelain']);
|
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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -65,6 +65,7 @@ fi
|
||||||
#
|
#
|
||||||
# Create Android keystore, if needed
|
# Create Android keystore, if needed
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
|
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
|
||||||
echo "Not creating Android keystore."
|
echo "Not creating Android keystore."
|
||||||
else
|
else
|
||||||
|
@ -73,16 +74,16 @@ else
|
||||||
fi
|
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).
|
echo ""
|
||||||
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
echo "###########################"
|
||||||
|
echo "# Custom parameters #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
#
|
echo "$CUSTOM_PARAMETERS"
|
||||||
# Build info
|
|
||||||
#
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
|
@ -100,14 +101,20 @@ echo "# Project directory #"
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
ls -alh $UNITY_PROJECT_PATH
|
ls -alh "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build
|
||||||
|
#
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo "# Building platform #"
|
echo "# Building project #"
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||||
|
|
||||||
unity-editor \
|
unity-editor \
|
||||||
-nographics \
|
-nographics \
|
||||||
-logfile /dev/stdout \
|
-logfile /dev/stdout \
|
||||||
|
@ -136,17 +143,24 @@ else
|
||||||
echo "Build failed, with exit code $BUILD_EXIT_CODE";
|
echo "Build failed, with exit code $BUILD_EXIT_CODE";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add permissions to make app runnable
|
#
|
||||||
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
# Permissions
|
||||||
ADD_PERMISSIONS_PATH=$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*
|
#
|
||||||
echo "Making the following path executable: $ADD_PERMISSIONS_PATH"
|
|
||||||
chmod +x $ADD_PERMISSIONS_PATH
|
# 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
|
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
|
# Add execute permissions to specific files
|
||||||
chown -R $CHOWN_FILES_TO $BUILD_PATH_FULL
|
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
||||||
chown -R $CHOWN_FILES_TO $UNITY_PROJECT_PATH
|
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*"
|
||||||
|
chmod +x "$OSX_EXECUTABLE_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -155,7 +169,7 @@ fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo "# Build directory #"
|
echo "# Build output #"
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
|
|
@ -251,8 +251,14 @@ export default class Versioning {
|
||||||
*/
|
*/
|
||||||
static async isDirty() {
|
static async isDirty() {
|
||||||
const output = await this.git(['status', '--porcelain']);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue