Skip to content

Commit

Permalink
Created copyRelease.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
Avril112113 committed Aug 16, 2022
1 parent 1fde230 commit ab28681
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/**
build/**
release/**
todo
31 changes: 31 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build WASM",
"command": "./build.bat",
"type": "shell",
"args": [],
"presentation": {
"reveal": "always"
},
"group": {
"kind": "build",
"isDefault": true
},
},
{
"label": "Update Lua",
"command": "./updateLua.bat",
"type": "shell",
"args": [],
"presentation": {
"reveal": "always"
},
"group": {
"kind": "build",
"isDefault": false
}
}
]
}
18 changes: 18 additions & 0 deletions .vscode/tasks_release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Update Lua",
"command": "./updateLua.bat",
"type": "shell",
"args": [],
"presentation": {
"reveal": "always"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

call env.bat

if exist "%BUILD_DIR%" rmdir "%BUILD_DIR%"
if exist "%BUILD_DIR%" rmdir /s /q "%BUILD_DIR%"
mkdir "%BUILD_DIR%"

python buildLua.py
Expand Down
28 changes: 28 additions & 0 deletions copyRelease.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@echo off

call env.bat

SET RELEASE_DIR=release

if exist "%RELEASE_DIR%" rmdir /s /q "%RELEASE_DIR%"
mkdir "%RELEASE_DIR%"
copy "typing_screeps.lua" "%RELEASE_DIR%\\typing_screeps.lua"
copy "env.bat" "%RELEASE_DIR%\\env.bat"
copy "buildLua.py" "%RELEASE_DIR%\\buildLua.py"
copy "updateLua.bat" "%RELEASE_DIR%\\updateLua.bat"

mkdir "%RELEASE_DIR%\\src"
mkdir "%RELEASE_DIR%\\src\\screeps"
xcopy /Y /s "src\\screeps" "%RELEASE_DIR%\\src\\screeps"
(
echo function Script.loop^(^)
echo.
echo end
) > "%RELEASE_DIR%\\src\\main.lua"

mkdir "%RELEASE_DIR%\\.vscode"
copy ".vscode\\tasks_release.json" "%RELEASE_DIR%\\.vscode\\tasks.json"

mkdir "%RELEASE_DIR%\\%BUILD_DIR%"
xcopy /Y /s "%BUILD_DIR%" "%RELEASE_DIR%\\%BUILD_DIR%"
del "%RELEASE_DIR%\\%BUILD_DIR%\\lua_files.js"

0 comments on commit ab28681

Please sign in to comment.