-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds LFS file checkout check to build
Work done for #196
- Loading branch information
Showing
3 changed files
with
68 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" | ||
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<!-- Register our task that as something to run before standard build target --> | ||
<Target Name="APRequireLfsAssets" BeforeTargets="PrepareForBuild"> | ||
<!-- <Message Text="[APVersionBeforeBuild] Debug: $(RuntimeIdentifier)" Importance="High" /> --> | ||
<Exec Command="pwd; git lfs ls-files" ConsoleToMSBuild="True" EchoOff="false" StandardOutputImportance="high" WorkingDirectory="$(MSBuildThisFileDirectory).."> | ||
<Output TaskParameter="ConsoleOutput" ItemName="FileStatus" /> | ||
</Exec> | ||
<Error File="$([System.String]::new(%(FileStatus.Identity)).Substring(13).Trim())" Code="AP001" Text="Git LFS BLOB has not been restored and only contains a LFS pointer to the file." Condition="$([System.String]::new(%(FileStatus.Identity)).Contains(' - '))" ContinueOnError="ErrorAndContinue"/> | ||
|
||
<Error Condition="'$(MSBuildLastTaskResult)'=='false'" Text="AP build cannot continue there are Git LFS assets that have not been restored. Please follow the instructions at https://github.com/QutEcoacoustics/audio-analysis/blob/master/CONTRIBUTING.md#AP001" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters