-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffdc059
commit 515913f
Showing
6 changed files
with
62 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash -- | ||
# Copyright (c) 2016, Google Inc. Please see the AUTHORS file for details. | ||
# All rights reserved. Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "Usage: tool/set_version <version>" | ||
echo | ||
echo "Updates pubspecs to specified version." | ||
fi | ||
|
||
version=$1 | ||
|
||
for pubspec in */pubspec.yaml; do | ||
# Remove any "path" imports. | ||
cat $pubspec \ | ||
| grep -v 'path:' \ | ||
| egrep -v 'built_value:$' \ | ||
| egrep -v 'built_value_generator:$' \ | ||
> pubspec.tmp | ||
|
||
# Update versions. | ||
sed -i -e \ | ||
"s#^version: .*#version: $version#" \ | ||
pubspec.tmp | ||
|
||
# Update dependencies. | ||
sed -i -e \ | ||
"s#.*built_value: .*# built_value: ^$version#" \ | ||
pubspec.tmp | ||
sed -i -e \ | ||
"s#.*built_value_generator: .*# built_value_generator: ^$version#" \ | ||
pubspec.tmp | ||
mv pubspec.tmp $pubspec | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash -- | ||
# Copyright (c) 2016, Google Inc. Please see the AUTHORS file for details. | ||
# All rights reserved. Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
if [ $# -ne 0 ]; then | ||
echo "Usage: tool/use_local_deps" | ||
echo | ||
echo "Changes dependencies to use local paths." | ||
fi | ||
|
||
for pubspec in */pubspec.yaml; do | ||
# Update dependencies. | ||
sed -i -e \ | ||
's/.*\(built_value: .*\)/# \1\n built_value:\n path: ..\/built_value/' \ | ||
$pubspec | ||
sed -i -e \ | ||
's/.*\(built_value_generator: .*\)/# \1\n built_value_generator:\n path: ..\/built_value_generator/' \ | ||
$pubspec | ||
done |