Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
75f2f1ab
Commit
75f2f1ab
authored
Nov 10, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #290 from TheBosZ/master
Move Python script over to Dart.
parents
0a1385d9
9d016b7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
21 deletions
+22
-21
CONTRIBUTING.md
CONTRIBUTING.md
+1
-1
update_packages.dart
dev/update_packages.dart
+21
-0
update_packages.py
dev/update_packages.py
+0
-20
No files found.
CONTRIBUTING.md
View file @
75f2f1ab
...
...
@@ -42,7 +42,7 @@ Getting the code and configuring your environment
*
`git remote add upstream git@github.com:flutter/flutter.git`
(So that you
fetch from the master repository, not your clone, when running
`git fetch`
et al.)
*
Run
`
./dev/update_packages.py
`
This will fetch all the Dart packages that
*
Run
`
dart ./dev/update_packages.dart
`
This will fetch all the Dart packages that
Flutter depends on. You can replicate what this script does by running
`pub get`
in each directory that contains a
`pubspec.yaml`
file.
*
Add this repository's
`bin`
directory to your path. That will let you use the
...
...
dev/update_packages.dart
0 → 100644
View file @
75f2f1ab
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
final
String
binaryName
=
Platform
.
isWindows
?
'pub.bat'
:
'pub'
;
update
(
Directory
directory
)
{
for
(
FileSystemEntity
dir
in
directory
.
listSync
())
{
if
(
dir
is
Directory
)
{
print
(
"Updating
${dir.path}
..."
);
Process
.
runSync
(
binaryName
,
[
'get'
],
workingDirectory:
dir
.
path
);
}
}
}
main
()
{
String
FLUTTER_ROOT
=
new
File
(
Platform
.
script
.
toFilePath
()).
parent
.
parent
.
path
;
update
(
new
Directory
(
"
$FLUTTER_ROOT
/packages"
));
update
(
new
Directory
(
"
$FLUTTER_ROOT
/examples"
));
}
dev/update_packages.py
deleted
100755 → 0
View file @
0a1385d9
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import
os
import
subprocess
FLUTTER_ROOT
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
def
update
(
directory
):
packages
=
sorted
(
os
.
listdir
(
directory
))
for
package
in
packages
:
package_dir
=
os
.
path
.
join
(
directory
,
package
)
if
os
.
path
.
isdir
(
package_dir
):
print
'Updating'
,
package
,
'...'
subprocess
.
check_call
([
'pub'
,
'get'
],
cwd
=
package_dir
)
update
(
os
.
path
.
join
(
FLUTTER_ROOT
,
'packages'
))
update
(
os
.
path
.
join
(
FLUTTER_ROOT
,
'examples'
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment