mirror of
https://github.com/captbaritone/webamp.git
synced 2026-08-01 14:33:38 +00:00
Add script to revert
This commit is contained in:
parent
fcb90bab8b
commit
c3e37158cf
3 changed files with 23 additions and 1 deletions
|
|
@ -24,6 +24,13 @@ echo "Build the webpack bundle"
|
|||
echo "Cleaning up node_modules/ to save space"
|
||||
( cd $NEW_CLONE && rm -r node_modules)
|
||||
|
||||
PREVIOUS=$(readlink -f public_html/projects/winamp2-js)
|
||||
|
||||
echo "The previous buid was: $PREVIOUS"
|
||||
|
||||
echo "Creating 'previous' link to enable reverts"
|
||||
ln -snf repos/previous
|
||||
|
||||
echo "Linking new Winamp2-js into place"
|
||||
ln -snf `pwd`/$NEW_CLONE/ public_html/projects/winamp2-js
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
"weight": "npm run build && gzip-size built/winamp.js | pretty-bytes",
|
||||
"test": "jest && npm run lint",
|
||||
"tdd": "jest --watch",
|
||||
"deploy": "ssh jordaneldredge.com sh < deploy.sh"
|
||||
"deploy": "ssh jordaneldredge.com sh < deploy.sh",
|
||||
"revert": "ssh jordaneldredge.com sh < revert.sh"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
14
revert.sh
Executable file
14
revert.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Bail on errors
|
||||
set -e
|
||||
|
||||
echo "Reverting..."
|
||||
|
||||
cd /var/www/jordaneldredge.com/
|
||||
|
||||
PREVIOUS=$(readlink -f repos/previous)
|
||||
echo "Rolling back to $PREVIOUS"
|
||||
ln -snf $PREVIOUS public_html/projects/winamp2-js
|
||||
|
||||
echo "Done!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue