90 Commits

Author SHA1 Message Date
Ian Hickson
c4e1a1b387
Fix locking to work with flutter and dart running simultaneously (#133350) 2023-08-25 21:30:07 +00:00
Deokgyu Yang
db8d1a4417
Add MSYS2 detection on Windows Terminal (#117612)
As the results of "uname -s" command is like the below on MSYS2 on
Windows Terminal,

MSYS_NT-10.0-22621

This patch fixes the Flutter command working on this kind of systems.

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
2023-01-12 22:15:11 +00:00
Ian Hickson
2835c3f116
Consider the FLUTTER_TOOL_ARGS as part of the compilation stamp (#94951) 2022-01-10 15:20:05 -08:00
Jonah Williams
fac0d26d73
[flutter_tools] check for cygwin uname in entrypoint scripts (#78037) 2021-03-15 12:08:03 -07:00
Greg Spencer
6db22118ad
Make flutter and dart scripts invoke their batch file equivalents on Windows (#59789)
This makes the flutter and dart scripts invoke their batch file equivalents if running under MINGW (i.e. git-bash) on Windows.

This allows for proper locking, and makes sure that people aren't using two different (and non-mutally-aware) locking systems when running flutter on Windows.

I also fixed a couple of places where we look for MINGW32, which fails under MINGW64. It just looks for MINGW now.
2020-06-18 13:29:24 -07:00
Christopher Fujino
30fed049fa
[flutter_tools] remove execute permissions on shared.sh, and move off path (#58267) 2020-05-29 16:03:02 -07:00
Greg Spencer
379e11b641
Update the flutter script's locking mechanism and follow_links (#57590)
Update the flutter and dart scripts' locking mechanism and follow_links function to be more robust and support more platforms.

This adds support for using mkdir as a fallback if the system doesn't have flock instead of using shlock, since shlock doesn't work on shared filesystems.

It also fixes a problem in the follow_links function where it failed when the link resolved to the root directory.
2020-05-27 15:30:46 -07:00
Christopher Fujino
06cd79d7df
[flutter_tools] Add additional bash entrypoint for running dart sdk directly (#57257) 2020-05-18 12:38:09 -07:00
Ben Konyi
461fe98f98
Disable DartDev when launching flutter_tools (#57143) 2020-05-14 11:42:01 -07:00
Jonah Williams
f90fcba40f
[flutter_tools] disable mirrors in tool snapshot (#51801) 2020-03-02 16:23:10 -08:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Jefferson Quesado
db041de63d Detecting when installing over MingW's Git Bash, fixing paths (#39699) 2019-10-24 11:06:46 -07:00
Jacob MacDonald
3f1f22c26e
dont precompile dependencies when building the flutter tool (#42771) 2019-10-15 13:34:04 -07:00
Ian Hickson
d37a38cee1 Revert "echo error messages to stderr (#37845)" (#39160)
This reverts commit 8a258dca4800cc11ced3b0c30e7e8b850901fce6.
2019-08-25 10:57:54 -07:00
ryenus
8a258dca48 echo error messages to stderr (#37845)
Otherwise the error messages would be executed as code when the output
is supposed to be sourced, e.g. $(flutter bash-completion)
2019-08-22 10:10:00 -07:00
Jonah Williams
fd1291fe5e
pass .packages path to snapshot invocation (#34517) 2019-06-15 10:20:19 -07:00
Ian Hickson
2767d37c96 RTL caret in text fields (#33461) 2019-06-03 10:25:54 -07:00
Christopher Fujino
7799afe248
make shellcheck (linter) recommended changes to bin/flutter (#30456) 2019-04-03 12:30:34 -07:00
Jonah Williams
d4f8a7f267
disable jit snapshot until we know what is going on here (#30204) 2019-03-29 13:10:36 -07:00
Jonah Williams
0a2175f133
Pass FLUTTER_TOOL_ARGS to snapshot command. (#29938) 2019-03-27 15:24:08 -07:00
Jonah Williams
72605d2406
Switch flutter_tools from script to app-jit snapshot. (#27749) 2019-03-15 19:33:24 -07:00
Jonah Williams
1e127003ab
update flutter and flutter.bat command to suggest stable branch (#27556) 2019-02-05 15:16:11 -08:00
Devon Carew
88fc38cf9b
don't pass the --packages-dir flag (#27323) 2019-01-31 08:31:03 -08:00
Michael Goderbauer
91dde9074a
No more nasty errors during flutter upgrade/channel on Windows (#21085)
Fixes https://github.com/flutter/flutter/issues/14578.
2018-08-28 09:37:34 -07:00
Michael Goderbauer
f17bb519b3
Revert "Copy flutter.bat before execution" (#20678) 2018-08-15 23:20:13 -07:00
Michael Goderbauer
28bc818054
Copy flutter.bat before execution (#20554) 2018-08-15 17:16:36 -07:00
Greg Spencer
01d6444490
Switch from infinite retries on upgrade to 10 retries. (#20450)
This changes the flutter tool to just try 10 times before giving up when running "flutter upgrade". Infinite retries can hang bots, and really don't provide a lot of help: if we've failed to upgrade for for nearly a minute, trying every five seconds, then something is just not responding.

Also, changed the bot default warning level to "normal" from "all", because the solver messages are VERY verbose: several megs of output for doing packages get on Flutter. "normal" will give warnings, user messages and errors, which should be sufficient to diagnose problems on the bots without spamming the log.

I removed the retrying for building the snapshot on flutter.bat because we don't do that on the other platforms, and because I can't imagine how running it again would give a different answer.

I also fixed a problem in the whitespace detection when no files matched the type of file that it is looking for, and removed the code that waits until failure to print the logs on setup, since reducing the log output made a huge difference.
2018-08-11 19:10:14 -07:00
Greg Spencer
e60087a1a7
Remove Travis configuration from flutter/flutter (#20288)
This removes the final traces of Travis and Appveyor from the Flutter tree.

I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).

There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).

FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
2018-08-07 13:41:33 -07:00
Ian Hickson
35346b4966
Increase verbosity on bots during setup and other minor cleanup (#19526)
The verbosity change is to help track down timeouts that currently look like:

```
C:\Windows\Temp\flutter sdk>call bin\flutter.bat config --no-analytics
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine c5a63d28bf3735569c8187753bc490d8351a8363...
Unzipping Dart SDK...
Updating flutter tool...
```
2018-07-20 11:01:45 -07:00
Greg Spencer
ace27819fe
Fix flutter shell script to handle properly shells that have CDPATH set (#17589)
Before this change, if CDPATH was set, and you type (from the flutter root) "bin/flutter --version" you would get an error.

This is because the cd command in follow_links was printing the directory Bash chose from the CDPATH to stdout, causing the path to have a newline in it, which understandably confuses the rest of the script.
2018-05-14 17:11:38 -07:00
Ohad Rau
e1946f1f68 Fix absolute shebangs in install scripts (#16135)
* Fix absolute shebang in /bin/flutter

* Fix absolute shebang in bin/internal/update_dart_sdk.sh
2018-04-02 22:21:04 -07:00
Ian Hickson
fe334e1652
More quoting in Bash (#15087)
Someone ended up with STAMP_PATH containing a blank line.

Also, replace [ with [[.
2018-03-02 17:54:51 -08:00
jcollins-g
bcdbed9628
Add upgrade locking for macs (#15038) 2018-03-02 09:52:14 -08:00
Todd Volkert
d2dcec22ce
Provide a more helpful error message when we detect the user is tryin… (#15032)
Fixes https://github.com/flutter/flutter/issues/14950
2018-03-01 12:24:25 -08:00
Paul Betts
f77826c5ee Allow Flutter to be vendored as a submodule (#14157)
When Flutter is vendored as a submodule, `.git` is a File whose contents
are a pointer to the Git directory. This change allows you to pin your
app to a certain version of Flutter via submodules.
2018-01-18 09:40:46 -08:00
Ian Hickson
9e42e4b88f
New release process (#14061)
Generate the "version" file from git tags.
Remove the old VERSION file and mentions of versions in pubspec.yaml files.
Replace the old update_versions.dart script with a new roll_dev.dart script.
Update "flutter channel".
Update "flutter upgrade", including making it transition from alpha to dev.
Update "flutter --version" and "flutter doctor".
2018-01-18 07:59:06 -08:00
Leaf Petersen
ab874da7be
Roll Dart SDK to 2.0.0-dev.16.0, along with associated package updates (#13857)
Rolling the Dart SDK to 2.0, with associated package updates.  

https://groups.google.com/forum/#!topic/flutter-dev/E22RdKAYjs8
2018-01-10 14:31:28 -08:00
Ian Hickson
77711d4a3c
Try to work better on NFS (#13955)
(untested)
2018-01-08 23:19:21 -08:00
Greg Spencer
f29ecba6de
Use .pub-cache from Flutter root, if it exists. (#13358)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.

This is an attempt to re-land: #13248. Includes a fix for the test that makes it work on bots in the presence of PUB_CACHE being set, and no other changes.
2017-12-05 14:46:39 -08:00
Greg Spencer
c89cf6ccc6
Reverting my .pub-cache change to figure out why it's still failing. (#13355)
* Revert "Add tests."

This reverts commit 31bad961ff2220a2708917ff8f748fed7efa9b51.

* Revert "Use .pub-cache from Flutter root, if it exists. (#13248)"

This reverts commit 72d6bcc3f7555c5a242f46cb09484f6c12e86f39.
2017-12-05 12:51:18 -08:00
Greg Spencer
72d6bcc3f7
Use .pub-cache from Flutter root, if it exists. (#13248)
The purpose of this PR is to make it so that when the user runs 'flutter', if they have a .pub-cache directory in their flutter root, we use that instead of the default location for the pub cache. Otherwise, it should act as before.

The eventual goal is to support a pre-populated flutter .zip/.tar.gz file that has everything the developer needs in one bundle. In order for that to actually work, we need to have the pub cache be self-contained, and not in the user's home dir.

Another advantage of this is that if you have multiple flutter repos that you're switching between, then the versions in the pub cache will remain static when you switch between them.
2017-12-05 12:02:14 -08:00
Ian Hickson
8079b1fbca Retry when pub fails in flutter tool. (#12069)
This ports the five-second retry interval from flutter.bat to the Bash
version. Failures during "pub get" of the flutter tool are common on
Travis and so this should help Travis reliability if nothing else.
2017-09-13 13:45:36 -07:00
Alexander Aprelev
c5750cd7ea Introduce --preview-dart-2 option to run new frontend compiler in flutter tools. (#11741)
This adds --preview-dart-2 flag that enables use of Dart 2.0 Frontend in Flutter tools.
2017-08-31 13:35:55 -07:00
Ian Hickson
58718e8bc7 Revert checked-mode patch. (#11086) 2017-07-05 15:34:02 -07:00
Ian Hickson
5f20f83415 Always run the flutter tool in checked mode. (#11069)
(Needs https://github.com/dart-lang/sdk/issues/28519)
2017-07-02 09:34:31 -07:00
Kevin Moore
a5aaaa8422 bin/flutter: don’t warn about running as root within Docker container (#10535)
Closes https://github.com/flutter/flutter/issues/10529

Via https://stackoverflow.com/a/25518345/39827
2017-06-06 12:22:34 -07:00
Todd Volkert
97f7ddf291 Remove root restriction (#10129)
* Remove root restriction

https://github.com/flutter/flutter/issues/9547

* Add back log msg
2017-05-16 20:03:55 -07:00
Michael Goderbauer
c256e6d557 Populate PUB_ENVIRONMENT for initial pub get and correctly detect APPVEYOR as bot (#9725)
* Populate PUB_ENVIRONMENT for initial pub get

* review comments

* change order
2017-05-02 11:25:59 -07:00
Chris Bracken
81b81d3087 Exit with error message when run as root (#8626) 2017-03-07 13:58:48 -08:00
Chris Bracken
4f05643cac Support flutter install paths containing spaces (#8014) 2017-02-08 19:27:11 -08:00