Skip to content

Commit

Permalink
fix(build): adapted the perl command to specify the backup file exten…
Browse files Browse the repository at this point in the history
…sion. This was necessary for some perl versions
  • Loading branch information
dsebastien committed May 23, 2018
1 parent cee2bb6 commit ec4afc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ updateVersionReferences() {
cd ${NPM_DIR}

local PATTERN="0\.0\.0\-PLACEHOLDER\-VERSION"
perl -p -i -e "s/$PATTERN/$1/g" ./package.json
perl -p -i.bak -e "s/$PATTERN/$1/g" ./package.json
)
}

Expand All @@ -367,7 +367,7 @@ updatePackageNameReferences() {
cd ${NPM_DIR}

local PATTERN="PLACEHOLDER\-PACKAGE\-NAME"
perl -p -i -e "s/$PATTERN/$1/g" ./package.json
perl -p -i.bak -e "s/$PATTERN/$1/g" ./package.json
)
}

Expand Down Expand Up @@ -440,7 +440,7 @@ adaptNpmPackageDependencies() {
# Packages will have dependencies between them. They will so have "devDependencies" and "peerDependencies" with different values.
# We should only replace the value of the devDependency for make it work.

perl -p -i -e "s/$PATTERN/$REPLACEMENT/" $PACKAGE_JSON_FILE
perl -p -i.bak -e "s/$PATTERN/$REPLACEMENT/" $PACKAGE_JSON_FILE
}

#######################################
Expand Down Expand Up @@ -490,7 +490,7 @@ logTrace "Executing function: ${FUNCNAME[0]}" 1
# Packages will have dependencies between them. They will so have "devDependencies" and "peerDependencies" with different values.
# We should only replace the value of the devDependency for make it work.

perl -p -i -0 -e "s/$PATTERN/$REPLACEMENT/m" $PACKAGE_JSON_FILE
perl -p -i.bak -0 -e "s/$PATTERN/$REPLACEMENT/m" $PACKAGE_JSON_FILE
}

#######################################
Expand Down

0 comments on commit ec4afc6

Please sign in to comment.