FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScriptServices/build.ps1 at angular2-lazy-loading-example · vblain/JavaScriptServices · GitHub
vblain
/
JavaScriptServices
Public
forked from
aspnet/JavaScriptServices
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScriptServices
/
build.ps1
Copy path
More file actions
More file actions
Latest commit
History
History
History
67 lines (53 loc) · 1.72 KB
Breadcrumbs
JavaScriptServices
/
build.ps1
Copy path
File metadata and controls
67 lines (53 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
61
62
63
64
65
66
67
$ErrorActionPreference
=
"
Stop
"
function
DownloadWithRetry
([
string
]
$url
,
[
string
]
$downloadLocation
,
[
int
]
$retries
)
{
while
(
$true
)
{
try
{
Invoke-WebRequest
$url
-
OutFile
$downloadLocation
break
}
catch
{
$exceptionMessage
=
$_
.Exception.Message
Write-Host
"
Failed to download '
$url
':
$exceptionMessage
"
if
(
$retries
-gt
0
) {
$retries
--
Write-Host
"
Waiting 10 seconds before retrying. Retries left:
$retries
"
Start-Sleep
-
Seconds
10
}
else
{
$exception
=
$_
.Exception
throw
$exception
}
}
}
}
cd
$PSScriptRoot
$repoFolder
=
$PSScriptRoot
$
env:
REPO_FOLDER
=
$repoFolder
$koreBuildZip
=
"
https://github.com/aspnet/KoreBuild/archive/dev.zip
"
if
(
$
env:
KOREBUILD_ZIP
)
{
$koreBuildZip
=
$
env:
KOREBUILD_ZIP
}
$buildFolder
=
"
.build
"
$buildFile
=
"
$buildFolder
\KoreBuild.ps1
"
if
(
!
(
Test-Path
$buildFolder
)) {
Write-Host
"
Downloading KoreBuild from
$koreBuildZip
"
$tempFolder
=
$
env:
TEMP
+
"
\KoreBuild-
"
+
[
guid
]::NewGuid()
New-Item
-
Path
"
$tempFolder
"
-
Type directory
|
Out-Null
$localZipFile
=
"
$tempFolder
\korebuild.zip
"
DownloadWithRetry
-
url
$koreBuildZip
-
downloadLocation
$localZipFile
-
retries
6
Add-Type
-
AssemblyName System.IO.Compression.FileSystem
[
System.IO.Compression.ZipFile
]::ExtractToDirectory(
$localZipFile
,
$tempFolder
)
New-Item
-
Path
"
$buildFolder
"
-
Type directory
|
Out-Null
copy-item
"
$tempFolder
\**\build\*
"
$buildFolder
-
Recurse
#
Cleanup
if
(
Test-Path
$tempFolder
) {
Remove-Item
-
Recurse
-
Force
$tempFolder
}
}
&
"
$buildFile
"
@args
Back
|
FazBrowse Home
|
New Git URL