add backup last build
This commit is contained in:
parent
f01d3177eb
commit
a37468e027
7
dist/bes-build
vendored
7
dist/bes-build
vendored
|
@ -9,8 +9,13 @@ bes.build(){
|
|||
bes.echo.state $?
|
||||
fi
|
||||
if [ -f "$APP_BIN" ]; then
|
||||
if [ "$1" = "-s" ]; then
|
||||
bes.echo.action "backup last build ${Coff}dist/$(date +%y%m%d)-$APP_NAME${Coff}"
|
||||
mv $APP_BIN $APP_DIR/dist/$(date +%y%m%d)-$APP_NAME
|
||||
else
|
||||
bes.echo.action "removing ${Coff}dist/$APP_NAME${Coff}"
|
||||
rm $APP_BIN
|
||||
fi
|
||||
bes.echo.state $?
|
||||
fi
|
||||
echo "#!/bin/bash" > $APP_BIN
|
||||
|
@ -150,7 +155,7 @@ bes.main(){
|
|||
echo
|
||||
if [ "$1" = "install" ]; then
|
||||
bes.install
|
||||
elif [ -z "$1" ]; then
|
||||
elif [ -z "$1" ] || [ "$1" = "-s" ]; then
|
||||
bes.build "$1"
|
||||
fi
|
||||
echo
|
||||
|
|
|
@ -9,8 +9,13 @@ bes.build(){
|
|||
bes.echo.state $?
|
||||
fi
|
||||
if [ -f "$APP_BIN" ]; then
|
||||
if [ "$1" = "-s" ]; then
|
||||
bes.echo.action "backup last build to ${Coff}dist/$(date +%y%m%d)-$APP_NAME${Coff}"
|
||||
mv $APP_BIN $APP_DIR/dist/$(date +%y%m%d)-$APP_NAME
|
||||
else
|
||||
bes.echo.action "removing ${Coff}dist/$APP_NAME${Coff}"
|
||||
rm $APP_BIN
|
||||
fi
|
||||
bes.echo.state $?
|
||||
fi
|
||||
echo "#!/bin/bash" > $APP_BIN
|
||||
|
|
|
@ -10,7 +10,7 @@ bes.main(){
|
|||
echo
|
||||
if [ "$1" = "install" ]; then
|
||||
bes.install
|
||||
elif [ -z "$1" ]; then
|
||||
elif [ -z "$1" ] || [ "$1" = "-s" ]; then
|
||||
bes.build "$1"
|
||||
fi
|
||||
echo
|
||||
|
|
Loading…
Reference in New Issue
Block a user