mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
Latest state of npm stuff
This commit is contained in:
parent
ce51e1dcf3
commit
28381b903f
1 changed files with 44 additions and 51 deletions
|
@ -2,61 +2,14 @@ call print_npm_and_brunch_header
|
|||
call print_dashed_seperator
|
||||
|
||||
set work_directory=%CD%
|
||||
set "coco_root=!repository_path!\coco"
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-mongodb
|
||||
echo !npm_mongodb!
|
||||
|
||||
set "mdb_directory=!repository_path!\cocodb"
|
||||
|
||||
if exist mdb_directory (
|
||||
rmdir /s /q "!mdb_directory!"
|
||||
)
|
||||
|
||||
md !mdb_directory!
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-db
|
||||
echo !npm_db!
|
||||
|
||||
set "curl_app=..\utilities\curl.exe"
|
||||
set "zu_app=..\utilities\7za.exe"
|
||||
set "keystuff=..\utilities\keystuff.exe"
|
||||
|
||||
call get_config database_backup
|
||||
set "coco_root=!repository_path!\coco"
|
||||
|
||||
cd !mdb_directory!
|
||||
|
||||
start cmd /c "%work_directory%\%keystuff% Alt-Tab && mongod --setParameter textSearchEnabled=true --dbpath !mdb_directory!"
|
||||
|
||||
%curl_app% -k !database_backup! -o dump.tar.gz
|
||||
|
||||
start cmd /c "%work_directory%\%keystuff% Alt-Tab && %zu_app% e dump.tar.gz && del dump.tar.gz && %zu_app% x dump.tar && del dump.tar"
|
||||
|
||||
cd !work_directory!
|
||||
echo %CD%
|
||||
echo %keystuff%
|
||||
%keystuff% Alt-Tab
|
||||
cd !mdb_directory!
|
||||
|
||||
pause
|
||||
|
||||
:: import
|
||||
|
||||
start /wait cmd /c "mongorestore dump"
|
||||
|
||||
:: remove
|
||||
|
||||
rmdir /s /q db
|
||||
|
||||
pause
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-script
|
||||
echo !npm_script!
|
||||
|
||||
:: ---- END
|
||||
goto:automatic_script
|
||||
|
||||
call get_local_text npm-install
|
||||
echo !npm_install!
|
||||
|
@ -89,8 +42,48 @@ cd "!coco_root!"
|
|||
start /wait cmd /c "echo !npm_npm! & npm install"
|
||||
cd "!work_directory!"
|
||||
|
||||
:: ------ HERE
|
||||
:: --- MONGODB
|
||||
|
||||
:mongodb
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-mongodb
|
||||
echo !npm_mongodb!
|
||||
|
||||
set "mdb_directory=!repository_path!\cocodb"
|
||||
|
||||
call print_dashed_seperator
|
||||
if exist mdb_directory (
|
||||
rmdir /s /q "!mdb_directory!"
|
||||
)
|
||||
|
||||
md !mdb_directory!
|
||||
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-db
|
||||
echo !npm_db!
|
||||
|
||||
call get_config database_backup
|
||||
|
||||
cd !mdb_directory!
|
||||
|
||||
start cmd /c "%work_directory%\%keystuff% Alt-Tab && mongod --setParameter textSearchEnabled=true --dbpath !mdb_directory!"
|
||||
|
||||
%curl_app% -k !database_backup! -o dump.tar.gz
|
||||
|
||||
start /wait cmd /c "%work_directory%\%keystuff% Alt-Tab && %zu_app% e dump.tar.gz && del dump.tar.gz && %zu_app% x dump.tar && del dump.tar"
|
||||
|
||||
start /wait cmd /c "mongorestore dump"
|
||||
|
||||
rmdir /s /q db
|
||||
|
||||
:: --- AUTOMATIC SCRIPT
|
||||
|
||||
::automatic_script
|
||||
call print_dashed_seperator
|
||||
call get_local_text npm-script
|
||||
echo !npm_script!
|
||||
|
||||
:: --- END
|
||||
|
||||
call print_dashed_seperator
|
||||
|
||||
pause
|
Loading…
Add table
Add a link
Reference in a new issue