Skip to content

Commit

Permalink
Add note about non-GNU sed; fix new pom.xml update to work as intende…
Browse files Browse the repository at this point in the history
…d on GNU sed
  • Loading branch information
srowen committed Mar 4, 2015
1 parent 703e1eb commit e875d4a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dev/change-version-to-2.10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Note that this will not necessarily work as intended with non-GNU sed (e.g. OS X)

find . -name 'pom.xml' | grep -v target \
| xargs -I {} sed -i -e 's|\(artifactId.*\)_2.11|\1_2.10|g' {}
| xargs -I {} sed -i -e 's/\(artifactId.*\)_2.10/\1_2.11/g' {}

# Also update <scala.binary.version> in parent POM
sed -i -e 's|<scala\.binary\.version>2.11<|<scala.binary.version>2.10<|1' pom.xml
sed -i -e '0,/<scala\.binary\.version>2.10</s//<scala.binary.version>2.11</' pom.xml
6 changes: 4 additions & 2 deletions dev/change-version-to-2.11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
# limitations under the License.
#

# Note that this will not necessarily work as intended with non-GNU sed (e.g. OS X)

find . -name 'pom.xml' | grep -v target \
| xargs -I {} sed -i -e 's|\(artifactId.*\)_2.10|\1_2.11|g' {}
| xargs -I {} sed -i -e 's/\(artifactId.*\)_2.11/\1_2.10/g' {}

# Also update <scala.binary.version> in parent POM
sed -i -e 's|<scala\.binary\.version>2.10<|<scala.binary.version>2.11<|1' pom.xml
sed -i -e '0,/<scala\.binary\.version>2.11</s//<scala.binary.version>2.10</' pom.xml

0 comments on commit e875d4a

Please sign in to comment.