Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pub: not found error when flutter_package: false #32 #34

Merged
merged 1 commit into from
Jul 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,22 @@ run_test_if_needed() {
}

create_prefix() {
FLUTTER_PREFIX=""
PUB_PREFIX="pub"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a difference between dart pub and flutter pub? It would be simpler to have PUB_PREFIX="dart pub" and use that everywhere

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CaseyHillers

I think you said right. flutter/flutter#88507
I will fix the next release.

EXECUTABLE_PREFIX="dart"
if "${INPUT_FLUTTER_PACKAGE}"; then
FLUTTER_PREFIX="flutter"
PUB_PREFIX=""
EXECUTABLE_PREFIX="flutter"
fi
}

dry_run() {
echo "Executing package validation"
$FLUTTER_PREFIX pub publish --dry-run
$EXECUTABLE_PREFIX pub publish --dry-run
}

publish_package() {
dry_run
if [ "${INPUT_DRY_RUN}" = false ]; then
echo "Publish package to Pub"
$FLUTTER_PREFIX pub publish -f
$EXECUTABLE_PREFIX pub publish -f
fi
}

Expand Down