Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
k-paxian authored Oct 16, 2022
1 parent 867b29c commit e707be5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ get_local_package_version() {
PACKAGE=`echo "$PACKAGE_INFO" | cut -d' ' -f1`
LOCAL_PACKAGE_VERSION=`echo "$PACKAGE_INFO" | cut -d' ' -f2`
if [ -z "$PACKAGE" ]; then
echo "No package found. :("
echo "::error::No package found. :("
echo "No package found. :(" >> $GITHUB_STEP_SUMMARY
exit 1
fi
Expand All @@ -71,14 +71,14 @@ get_local_package_version() {

run_unit_tests() {
if [ "$INPUT_SKIPTESTS" = "true" ]; then
echo "Skip unit tests set to true, skip unit testing."
echo "::notice::Skip unit tests set to true, skip unit testing."
else
HAS_BUILD_RUNNER=`echo "$DEPS_OUTPUT" | perl -n -e'/^.* build_runner (.*)/ && print $1'`
HAS_BUILD_TEST=`echo "$DEPS_OUTPUT" | perl -n -e'/^.* build_test (.*)/ && print $1'`
HAS_TEST=`echo "$DEPS_OUTPUT" | perl -n -e'/^.* (test|flutter_test) (.*)/ && print $2'`
if [ "$HAS_BUILD_RUNNER" != "" ] && [ "$HAS_BUILD_TEST" != "" ] && [ "$INPUT_SUPPRESSBUILDRUNNER" != "true" ]; then
if [ "$INPUT_FLUTTER" = "true" ]; then
echo "flutter tests with build_runner"
echo "::notice::flutter tests with build_runner"
flutter pub run build_runner build --delete-conflicting-outputs
flutter test
else
Expand All @@ -92,7 +92,7 @@ run_unit_tests() {
dart pub run test
fi
else
echo "No unit test related dependencies detected, skip unit testing."
echo "::notice::No unit test related dependencies detected, skip unit testing."
echo "No unit test related dependencies detected, skip unit testing." >> $GITHUB_STEP_SUMMARY
fi
fi
Expand All @@ -109,9 +109,9 @@ get_remote_package_version() {
if [ -z "$REMOTE_PACKAGE_VERSION" ]; then
REMOTE_PACKAGE_VERSION=""
fi
echo "Local version: [$LOCAL_PACKAGE_VERSION]"
echo "::notice::Local version: [$LOCAL_PACKAGE_VERSION]"
echo "Local version: [$LOCAL_PACKAGE_VERSION]" >> $GITHUB_STEP_SUMMARY
echo "Remote version: [$REMOTE_PACKAGE_VERSION]"
echo "::notice::Remote version: [$REMOTE_PACKAGE_VERSION]"
echo "Remote version: [$REMOTE_PACKAGE_VERSION]" >> $GITHUB_STEP_SUMMARY
echo "remoteVersion=$REMOTE_PACKAGE_VERSION" >> $GITHUB_OUTPUT
}
Expand All @@ -128,7 +128,7 @@ format() {

publish() {
if [ "$LOCAL_PACKAGE_VERSION" = "$REMOTE_PACKAGE_VERSION" ]; then
echo "Remote & Local versions are equal, skip publishing."
echo "::notice::Remote & Local versions are equal, skip publishing."
echo "Remote & Local versions are equal, skip publishing." >> $GITHUB_STEP_SUMMARY
else
mkdir -p ~/.config/dart
Expand All @@ -151,16 +151,16 @@ EOF
dart pub lish --dry-run
fi
if [ $? -eq 0 ]; then
echo "Dry Run Successfull."
echo "::notice::Dry Run Successfull."
else
if [ "$INPUT_FORCE" != "true" ] && [ "$INPUT_TESTRUNONLY" != "true" ]; then
echo "Dry Run Failed, skip real publishing."
echo "::error::Dry Run Failed, skip real publishing."
echo "Dry Run Failed, skip real publishing." >> $GITHUB_STEP_SUMMARY
exit 1
fi
fi
if [ "$INPUT_DRYRUNONLY" = "true" ]; then
echo "Dry run only, skip publishing."
echo "::notice::Dry run only, skip publishing."
echo "Dry run only, skip publishing." >> $GITHUB_STEP_SUMMARY
else
if [ "$INPUT_FLUTTER" = "true" ]; then
Expand Down

0 comments on commit e707be5

Please sign in to comment.