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

Bump actions/upload-artifact from 3.0.0 to 3.1.2 #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: SARIF file
path: results.sarif
Expand Down
19 changes: 14 additions & 5 deletions packages/flutter_tools/lib/src/commands/update_packages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class UpdatePackagesCommand extends FlutterCommand {
fakePackage.writeAsStringSync(
_generateFakePubspec(
dependencies,
useAnyVersion: doUpgrade,
doUpgrade: doUpgrade,
),
);
// Create a synthetic flutter SDK so that transitive flutter SDK
Expand Down Expand Up @@ -1321,8 +1321,17 @@ class PubspecDependency extends PubspecLine {

/// This generates the entry for this dependency for the pubspec.yaml for the
/// fake package that we'll use to get the version numbers figured out.
void describeForFakePubspec(StringBuffer dependencies, StringBuffer overrides, { bool useAnyVersion = true}) {
final String versionToUse = useAnyVersion || version.isEmpty ? 'any' : version;
void describeForFakePubspec(StringBuffer dependencies, StringBuffer overrides, { bool doUpgrade = true }) {
final String versionToUse;
if (version.isEmpty) {
versionToUse = 'any';
} else if (doUpgrade) {
// Must wrap in quotes for Yaml parsing
versionToUse = "'>= $version'";
} else {
versionToUse = version;
}
// final versionToUse = useAnyVersion || version.isEmpty ? 'any' : version;
switch (kind) {
case DependencyKind.unknown:
case DependencyKind.overridden:
Expand Down Expand Up @@ -1385,7 +1394,7 @@ String _generateFakePubspec(
}) {
final StringBuffer result = StringBuffer();
final StringBuffer overrides = StringBuffer();
final bool verbose = useAnyVersion;
final bool verbose = doUpgrade;
result.writeln('name: flutter_update_packages');
result.writeln('environment:');
result.writeln(" sdk: '>=2.10.0 <3.0.0'");
Expand Down Expand Up @@ -1415,7 +1424,7 @@ String _generateFakePubspec(
}
for (final PubspecDependency dependency in dependencies) {
if (!dependency.pointsToSdk) {
dependency.describeForFakePubspec(result, overrides, useAnyVersion: useAnyVersion);
dependency.describeForFakePubspec(result, overrides, doUpgrade: doUpgrade);
}
}
result.write(overrides.toString());
Expand Down