diff --git a/benchmark/pubspec.yaml b/benchmark/pubspec.yaml index 522f91e7..1f9c8616 100644 --- a/benchmark/pubspec.yaml +++ b/benchmark/pubspec.yaml @@ -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 diff --git a/built_value_generator/pubspec.yaml b/built_value_generator/pubspec.yaml index b0a9c66b..d9c403bc 100644 --- a/built_value_generator/pubspec.yaml +++ b/built_value_generator/pubspec.yaml @@ -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' diff --git a/chat_example/pubspec.yaml b/chat_example/pubspec.yaml index 2195dd72..46c8b4bf 100644 --- a/chat_example/pubspec.yaml +++ b/chat_example/pubspec.yaml @@ -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 diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 59ab93c6..dcbf91f8 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -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 diff --git a/tool/set_version b/tool/set_version new file mode 100755 index 00000000..1da22f0e --- /dev/null +++ b/tool/set_version @@ -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 " + 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 diff --git a/tool/use_local_deps b/tool/use_local_deps new file mode 100755 index 00000000..da8a2185 --- /dev/null +++ b/tool/use_local_deps @@ -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