mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-28 20:40:39 +00:00
Add deploy script
This commit is contained in:
parent
ed319db080
commit
ac2ed8ba6e
2 changed files with 32 additions and 1 deletions
30
deploy.sh
Executable file
30
deploy.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Bail on errors
|
||||
set -e
|
||||
|
||||
cd /var/www/jordaneldredge.com/
|
||||
|
||||
# Generate a new directory to clone to
|
||||
NEW_CLONE=repos/winamp2-js-`date +%s`
|
||||
|
||||
# Do the clone
|
||||
echo "Cloning vim-awesome"
|
||||
git clone git@github.com:captbaritone/winamp2-js.git $NEW_CLONE > /dev/null
|
||||
|
||||
echo "Installing Node requirements"
|
||||
( cd $NEW_CLONE && npm install)
|
||||
|
||||
echo "Run tests"
|
||||
( cd $NEW_CLONE && npm run test )
|
||||
|
||||
echo "Build the webpack bundle"
|
||||
( cd $NEW_CLONE && npm run build)
|
||||
|
||||
echo "Cleaning up node_modules/ to save space"
|
||||
( cd $NEW_CLONE && rm -r node_modules)
|
||||
|
||||
echo "Linking new Winamp2-js into place"
|
||||
ln -snf `pwd`/$NEW_CLONE/ public_html/projects/winamp2-js
|
||||
|
||||
echo "Done!"
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
"build": "webpack --optimize-minimize",
|
||||
"serve": "webpack-dev-server",
|
||||
"weight": "npm run build && gzip-size built/winamp.js | pretty-bytes",
|
||||
"test": "jest && npm run lint"
|
||||
"test": "jest && npm run lint",
|
||||
"deploy": "ssh jordaneldredge.com sh < deploy.sh"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue