-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_release.ps1
More file actions
60 lines (48 loc) · 1.97 KB
/
build_release.ps1
File metadata and controls
60 lines (48 loc) · 1.97 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
51
52
53
54
55
56
57
58
59
60
# build a release for github
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
# Clean release and build folder completely
Remove-Item ".\release" -Recurse -Force
Remove-Item ".\build" -Recurse -Force
# create release directory if not existing
$path = ".\release"
New-Item "$($path)" -Force -itemType Directory
# copy php files from main folder to the same structure
Copy-Item ".\wp_post_map_view_simple.php" -Destination "$($path)\wp_post_map_view_simple.php"
Copy-Item ".\uninstall.php" -Destination "$($path)\uninstall.php"
Copy-Item ".\readme.md" -Destination "$($path)\readme.md"
Copy-Item ".\readme.txt" -Destination "$($path)\readme.txt"
# first build the new gutenberg block build files
npm run build # this uses the file ./js/webpack.config.js.
# copy gutenberg, swiper, fotorama, leaflet-map build files
$path = ".\release"
$path = "$($path)\build"
New-Item "$($path)" -Force -itemType Directory
robocopy .\build $path *.* /s /NFL /NDL /NJH /NJS
# ./css
## ./css copy all images
$path = ".\release"
$path = "$($path)\css"
robocopy .\css $path *.css /s /NFL /NDL /NJH /NJS
# ./images -all icons
$path = ".\release"
$path = "$($path)\images"
robocopy .\images $path *.* /s /NFL /NDL /NJH /NJS
# ./inc
$path = ".\release"
$path = "$($path)\inc"
robocopy .\inc $path *.* /s /xf shortCodeTester.php /NFL /NDL /NJH /NJS
# ./languages
$path = ".\release"
$path = "$($path)\languages"
robocopy .\languages $path *.* /s /NFL /NDL /NJH /NJS
# ./leaflet_map_tiles - without the subdirectories
$path = ".\release"
$path = "$($path)\leaflet_map_tiles"
robocopy .\leaflet_map_tiles $path *.* /NFL /NDL /NJH /NJS
# ./settings - all
$path = ".\release"
$path = "$($path)\settings"
robocopy .\settings $path *.* /NFL /NDL /NJH /NJS
# Finally write a warning that CSS-Files should have been minified before
Write-Warning "War webpack auf production gesetzt?"
Write-Warning "Nun den Inhalt vom realease-Ordner zippen als postmapviewsimple.zip. Fertig"