Skip to content

Commit

Permalink
Release 0.4.1. Add scripts to help.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmorgan committed Nov 29, 2016
1 parent ffdc059 commit 515913f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 21 deletions.
8 changes: 2 additions & 6 deletions benchmark/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ environment:
dependencies:
browser: any
built_collection: '^1.0.0'
# built_value: '^0.4.1'
built_value:
path: ../built_value
built_value: ^0.4.1

dev_dependencies:
build: '^0.4.0'
# built_value_generator: '^0.4.1'
built_value_generator:
path: ../built_value_generator
built_value_generator: ^0.4.1
source_gen: '>=0.5.0+03 <0.6.0'
quiver: '>=0.21.0 <0.24.0'
test: any
4 changes: 1 addition & 3 deletions built_value_generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ dependencies:
analyzer: '>=0.28.0 <0.29.0'
build: '^0.4.1'
built_collection: '^1.0.0'
# built_value: '^0.4.1'
built_value:
path: ../built_value
built_value: ^0.4.1
meta: '^1.0.4'
source_gen: '>=0.5.0+03 <0.6.0'
quiver: '>=0.21.0 <0.24.0'
Expand Down
8 changes: 2 additions & 6 deletions chat_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ environment:

dependencies:
built_collection: '^1.0.0'
# built_value: '^0.4.1'
built_value:
path: ../built_value
built_value: ^0.4.1
package_resolver: ^1.0.0
route: '>=0.4.6'

dev_dependencies:
build: '^0.4.0'
# built_value_generator: '^0.4.1'
built_value_generator:
path: ../built_value_generator
built_value_generator: ^0.4.1
source_gen: '>=0.5.0+03 <0.6.0'
test: any
8 changes: 2 additions & 6 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ environment:
dependencies:
meta: '^1.0.4'
built_collection: '^1.0.0'
# built_value: '^0.4.1'
built_value:
path: ../built_value
built_value: ^0.4.1

dev_dependencies:
build: '^0.4.0'
# built_value_generator: '^0.4.1'
built_value_generator:
path: ../built_value_generator
built_value_generator: ^0.4.1
source_gen: '>=0.5.0+03 <0.6.0'
quiver: '>=0.21.0 <0.24.0'
test: any
35 changes: 35 additions & 0 deletions tool/set_version
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
20 changes: 20 additions & 0 deletions tool/use_local_deps
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

0 comments on commit 515913f

Please sign in to comment.