Skip to content

Commit

Permalink
Fix sed command that breaks on linux (#545)
Browse files Browse the repository at this point in the history
* fix sed command that breaks on linux

* fixing rm error
  • Loading branch information
thechenky authored Aug 1, 2019
1 parent e32e8cc commit 381c733
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions integration_test/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ function build_sdk {
function pick_node8 {
cd "${DIR}"
cp package.node8.json functions/package.json
sed -i '' "s/firebase-functions.tgz/firebase-functions-${TIMESTAMP}.tgz/g" functions/package.json
# we have to do the -e flag here so that it work both on linux and mac os, but that creates an extra
# backup file called package.json-e that we should clean up afterwards.
sed -i -e "s/firebase-functions.tgz/firebase-functions-${TIMESTAMP}.tgz/g" functions/package.json
rm -f functions/package.json-e
}

function pick_node10 {
cd "${DIR}"
cp package.node10.json functions/package.json
sed -i '' "s/firebase-functions.tgz/firebase-functions-${TIMESTAMP}.tgz/g" functions/package.json
# we have to do the -e flag here so that it work both on linux and mac os, but that creates an extra
# backup file called package.json-e that we should clean up afterwards.
sed -i -e "s/firebase-functions.tgz/firebase-functions-${TIMESTAMP}.tgz/g" functions/package.json
rm -f functions/package.json-e
}

function install_deps {
Expand Down Expand Up @@ -101,7 +107,7 @@ function run_tests {
function cleanup {
announce "Performing cleanup..."
delete_all_functions
rm "${DIR}/functions/firebase-functions-*.tgz"
rm "${DIR}/functions/firebase-functions-${TIMESTAMP}.tgz"
rm "${DIR}/functions/package.json"
rm -f "${DIR}/functions/firebase-debug.log"
rm -rf "${DIR}/functions/lib"
Expand Down

0 comments on commit 381c733

Please sign in to comment.