Skip to content

Commit 1c8bef1

Browse files
committed
Restructuring, creating proper directory structure for TFS build task
1 parent e0b0818 commit 1c8bef1

File tree

256 files changed

+4100
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+4100
-0
lines changed

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
# Created by https://www.gitignore.io/api/node
3+
4+
### Node ###
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (https://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# TypeScript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
# parcel-bundler cache (https://parceljs.org/)
65+
.cache
66+
67+
# next.js build output
68+
.next
69+
70+
# nuxt.js build output
71+
.nuxt
72+
73+
# vuepress build output
74+
.vuepress/dist
75+
76+
# Serverless directories
77+
.serverless
78+
79+
80+
# End of https://www.gitignore.io/api/node
81+
*.vsix

CompileMql5Task/CompileMql5.ps1

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[CmdletBinding()]
2+
param()
3+
4+
Trace-VstsEnteringInvocation $MyInvocation
5+
6+
try {
7+
Import-VstsLocStrings "$PSScriptRoot\task.json"
8+
9+
#get the inputs
10+
[string]$pathToSources = Get-VstsInput -Name pathToSources -Require
11+
[string]$mql5IncludePath = Get-VstsInput -Name mql5IncludePath
12+
13+
if("$mql5IncludePath" -eq "")
14+
{
15+
$mql5IncludePath = $PSScriptRoot
16+
}
17+
18+
if("$pathToSources" -eq "")
19+
{
20+
$pathToSources = "$($env:BUILD_SOURCESDIRECTORY)\*.mqproj"
21+
}
22+
23+
$compileFiles = Find-VstsMatch -DefaultRoot $env:BUILD_SOURCESDIRECTORY -Pattern $pathToSources
24+
25+
foreach($file in $compileFiles)
26+
{
27+
Write-Host "Compiling MQL5 files: $file"
28+
29+
$proc = New-Object System.Diagnostics.Process
30+
$proc.StartInfo.UseShellExecute = $false
31+
$proc.StartInfo.FileName = "$PSScriptRoot\metaeditor64.exe"
32+
$proc.StartInfo.CreateNoWindow = $true
33+
$proc.StartInfo.Arguments = "/compile:`"$file`" /log /include:`"$mql5IncludePath`""
34+
$proc.Start() | Out-Null
35+
$proc.WaitForExit()
36+
$exitCode = $proc.ExitCode
37+
38+
#find all log files created since we started compilation
39+
$logFile = [System.IO.Path]::ChangeExtension($file, ".log")
40+
if(Test-Path $logFile -PathType Leaf)
41+
{
42+
Write-Host "Compilation log $([System.IO.Path]::GetFileName($logFile)):"
43+
Write-Host "====================================================================="
44+
Write-Host (Get-Content $logFile -Raw)
45+
}
46+
else
47+
{
48+
Write-Host "No log created during compilation."
49+
}
50+
51+
#1 - when successful, 0 when fails
52+
if($exitCode -ne 1)
53+
{
54+
Write-Error "Compilation failed (exit code $exitCode)"
55+
}
56+
}
57+
58+
} finally {
59+
Trace-VstsLeavingInvocation $MyInvocation
60+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)