Files
leanote/bin/release.sh

76 lines
1.6 KiB
Bash
Raw Normal View History

2014-05-09 17:56:14 +08:00
#!/bin/sh
# release leanote
SP=$(cd "$(dirname "$0")"; pwd)
cd $SP
cd ../
# tmp path to store leanote release files
tmp="/Users/life/Desktop/leanote_release"
2014-11-12 21:12:02 +08:00
version=x86_64.v1.0-beta2
2014-10-23 11:41:02 +08:00
2014-05-09 17:56:14 +08:00
rm -rf $tmp/leanote
mkdir -p $tmp/leanote/app
mkdir -p $tmp/leanote/conf
mkdir -p $tmp/leanote/bin
# bin
cp -r ./bin/src $tmp/leanote/bin/
cp ./bin/run.sh $tmp/leanote/bin/
2014-10-23 11:41:02 +08:00
# LICENSE
cp ./LICENSE $tmp/leanote/
2014-05-09 17:56:14 +08:00
# views
cp -r ./app/views $tmp/leanote/app
2014-05-27 13:29:19 +08:00
# 可不要
cp -r ./app/service $tmp/leanote/app/service
cp -r ./app/controllers $tmp/leanote/app/controllers
cp -r ./app/db $tmp/leanote/app/db
cp -r ./app/info $tmp/leanote/app/info
cp -r ./app/lea $tmp/leanote/app/lea
2014-05-09 17:56:14 +08:00
# conf
cp ./conf/app.conf-default $tmp/leanote/conf/app.conf
cp ./conf/routes-default $tmp/leanote/conf/routes
# others
cp -r ./messages ./public ./mongodb_backup $tmp/leanote/
# delete some files
rm -r $tmp/leanote/public/tinymce/classes
2014-09-04 16:15:57 +08:00
rm -r $tmp/leanote/public/upload
mkdir $tmp/leanote/public/upload
2014-10-23 11:41:02 +08:00
mkdir $tmp/leanote/files
2014-09-04 16:15:57 +08:00
rm -r $tmp/leanote/public/.codekit-cache
rm $tmp/leanote/public/.DS_Store
rm $tmp/leanote/public/config.codekit
2014-05-09 17:56:14 +08:00
# make link
cd $tmp/leanote/bin
2014-10-23 11:41:02 +08:00
mkdir ./src/github.com/leanote
2014-05-09 17:56:14 +08:00
ln -s ../../../../ ./src/github.com/leanote/leanote
# archieve
# << 'BLOCK
# linux
cd $SP
cd ../
cp ./bin/leanote-linux $tmp/leanote/bin/
cd $tmp
2014-10-23 11:41:02 +08:00
tar -cvf $tmp/leanote-linux-$version.bin.tar leanote
gzip $tmp/leanote-linux-$version.bin.tar
2014-05-09 17:56:14 +08:00
# mac
rm $tmp/leanote/bin/leanote-linux
cd $SP
cd ../
cp ./bin/leanote-mac $tmp/leanote/bin/
cd $tmp
2014-10-23 11:41:02 +08:00
tar -cvf $tmp/leanote-mac-$version.bin.tar leanote
gzip $tmp/leanote-mac-$version.bin.tar
2014-05-09 17:56:14 +08:00
# BLOCK'