-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.ps1
More file actions
50 lines (36 loc) · 1.45 KB
/
package.ps1
File metadata and controls
50 lines (36 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Write-Host ":::: =========================="
Write-Host ":::: TESTING GAMEDATA FOR CS:GO"
Write-Host ":::: =========================="
$base = Get-Location
Set-Location test
& ./test.ps1 -SUPPRESS_BUILD:$True
Write-Host ":::: ==========================="
Write-Host ":::: BUILDING INDIVIDUAL PLUGINS"
Write-Host ":::: ==========================="
Set-Location $base
Set-Location src
& ./build.ps1
Write-Host ":::: ============================"
Write-Host ":::: PACKAGING SOURCEFORKS ASSETS"
Write-Host ":::: ============================"
Set-Location $base
if (Test-Path -PathType Container package)
{
Write-Host "* Clearing old package"
Remove-Item -Path package -Recurse
}
Write-Host "* Creating package directory"
New-Item -Path package -Type Directory
Write-Host "* Creating directories"
New-Item -Path package/addons -Type Directory
New-Item -Path package/addons/sourcemod -Type Directory
Copy-Item -Recurse -Path gamedata -Destination package/addons/sourcemod
Remove-Item -Path package/addons/sourcemod/gamedata/partial -Recurse
# ^ Remove partial gamedatas
Copy-Item -Recurse -Path src/plugins -Destination package/addons/sourcemod
Copy-Item -Recurse -Path src/cfg -Destination package/
Write-Host ":::: =========================="
Write-Host ":::: COMPRESSING PACKAGE TO ZIP"
Write-Host ":::: =========================="
Compress-Archive -Force -Path package/* -DestinationPath counterstats.zip
Write-Host "* Done!"