Browse Source

Fix sed issues in the release scripts

Passing in a blank string after `-i` will cause sed to fail, as it
tries to interpret it as a file (which does not exist) and bails
out.
Kevin Brown 11 years ago
parent
commit
5b2516818c
1 changed files with 7 additions and 4 deletions
  1. 7 4
      release.sh

+ 7 - 4
release.sh

@@ -28,12 +28,14 @@ git pull
 
 echo "Updating Version Identifiers"
 
-sed -E -e "s/\"version\": \"([0-9\.]+)\",/\"version\": \"$ver\",/g" -i "" bower.json select2.jquery.json component.json composer.json package.json
+sed -E -e "s/\"version\": \"([0-9\.]+)\",/\"version\": \"$ver\",/g" -i -- bower.json select2.jquery.json component.json composer.json package.json
+
 git add bower.json
 git add select2.jquery.json
 git add component.json
 git add composer.json
 git add package.json
+
 git commit -m "modified version identifiers in descriptors for release $ver"
 git push
 
@@ -42,9 +44,10 @@ git checkout "$branch"
 
 echo "Tokenizing..."
 
-find . -name "$js" | xargs -I{} sed -e "$tokens" -i "" {}
-find . -name "$css" | xargs -I{} sed -e "$tokens" -i "" {}
-sed -e "s/latest/$ver/g" -i "" bower.json
+find . -name "$js" | xargs -I{} sed -e "$tokens" -i -- {}
+find . -name "$css" | xargs -I{} sed -e "$tokens" -i -- {}
+
+sed -e "s/latest/$ver/g" -i -- bower.json
 
 git add "$js"
 git add "$css"