Skip to content

Commit

Permalink
chore(ci): use portable sed commands (angular#11622)
Browse files Browse the repository at this point in the history
use commands that should work with GNU and BSD sed
add more log statements

Relates to angular#11592.
  • Loading branch information
Splaktar authored and mmalerba committed Jan 30, 2019
1 parent 95d2de0 commit cc9646a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/snapshot-docs-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function run {
cd ../

echo "-- Building docs site release..."
rm -rf dist
rm -rf dist/
gulp docs --release

echo "-- Cloning code.material.angularjs.org..."
Expand All @@ -18,13 +18,17 @@ function run {
echo "-- Remove previous snapshot..."
rm -rf code.material.angularjs.org/HEAD

echo "-- Copying docs site to snapshot..."
sed -i "s,http://localhost:8080/angular-material,https://cdn.gitcdn.link/cdn/angular/bower-material/v$VERSION/angular-material,g" dist/docs/docs.js
sed -i "s,http://localhost:8080/docs.css,https://material.angularjs.org/$VERSION/docs.css,g" dist/docs/docs.js
sed -i "s,base href=\",base href=\"/HEAD,g" dist/docs/index.html
echo "-- Applying substitutions to build..."
sed -i.bak "s,http://localhost:8080/angular-material,https://cdn.gitcdn.link/cdn/angular/bower-material/v$VERSION/angular-material,g" dist/docs/docs.js
sed -i.bak "s,http://localhost:8080/docs.css,https://material.angularjs.org/$VERSION/docs.css,g" dist/docs/docs.js
rm dist/docs/docs.js.bak
sed -i.bak "s,base href=\",base href=\"/HEAD,g" dist/docs/index.html
rm dist/docs/index.html.bak

echo "-- Copying docs site to snapshot..."
cp -Rf dist/docs code.material.angularjs.org/HEAD

echo "-- Configuring Git..."
commitAuthorName=$(git --no-pager show -s --format='%an' HEAD)
commitAuthorEmail=$(git --no-pager show -s --format='%ae' HEAD)

Expand Down

0 comments on commit cc9646a

Please sign in to comment.