Skip to content

Commit

Permalink
FIx deploy script to remove old files
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Jul 22, 2020
1 parent 43ffaf6 commit fa55ff2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,6 @@ stratos-frontend-prebuild.zip
src/frontend/assets
src/frontend/sass
go-vendor-*.tgz

website/build
website/site-dist
4 changes: 2 additions & 2 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

website/build
website/site-dist
/website/build
/website/site-dist
16 changes: 11 additions & 5 deletions website/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,25 @@ fi

msg="Website update: $(date)"

tmpdir=./site-dist
rm -rf site-dist
mkdir -p $tmpdir
pushd $tmpdir
echo "Cloning web site"
rm -rf ./site-dist
git clone git@github.com:cf-stratos/website.git site-dist
git clone git@github.com:cf-stratos/website.git

echo "Copying newer site content ..."
rsync --delete -r ./build/ ./site-dist
rsync --delete --exclude=.git -r $DIR/build/ ./website

cd site-dist
cd website
echo "Adding all files"
git add -A
git commit -m "${msg}"
echo "Pushing changes ..."
git push
cd ..

popd > /dev/null

rm -rf $tmpdir

popd > /dev/null

0 comments on commit fa55ff2

Please sign in to comment.