forked from github/ossar-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.proj
29 lines (24 loc) · 1.19 KB
/
build.proj
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RepoDirectory Condition=" '$(RepoDirectory)' == '' ">$(MSBuildThisFileDirectory)</RepoDirectory>
<SrcDirectory Condition=" '$(SrcDirectory)' == '' ">$(RepoDirectory)/src</SrcDirectory>
<LibDirectory Condition=" '$(LibDirectory)' == '' ">$(RepoDirectory)/lib</LibDirectory>
<NpmInstall Condition=" '$(NpmInstall)' == ''">false</NpmInstall>
</PropertyGroup>
<Target Name="Clean">
<RemoveDir Directories="$(LibDirectory)" />
</Target>
<Target
Name="NpmInstall"
Inputs="$(RepoDirectory)"
Outputs="$(RepoDirectory)\node_modules"
Condition=" '$(NpmInstall)' == 'true' ">
<Message Text="Installing npm dependencies in: $(RepoDirectory)" />
<Exec Command="npm install" WorkingDirectory="$(RepoDirectory)" />
</Target>
<Target Name="Build" DependsOnTargets="Clean;NpmInstall">
<Message Text="Compiling github/ossar-action." />
<Exec Command="tsc" WorkingDirectory="$(RepoDirectory)" />
</Target>
</Project>