Skip to content

Add nuspec and build file #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 12, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Microsoft.jQuery.Unobtrusive.Validation.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<package
xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.jQuery.Unobtrusive.Validation</id>
<version>$version$</version>
<title>Microsoft jQuery Unobtrusive Validation</title>
<authors>Microsoft</authors>
<owners>Microsoft,aspnet</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>https://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm</licenseUrl>
<projectUrl>https://www.asp.net/</projectUrl>
<iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
<description>jQuery plugin that unobtrusively sets up jQuery.Validation.</description>
<summary>The jQuery Unobtrusive Validation library complements jQuery Validation by adding support for specifying validation options as HTML5 data-* elements</summary>
<releaseNotes>Please visit https://go.microsoft.com/fwlink/?LinkId=389866 to view the release notes.</releaseNotes>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<tags>jQuery Unobtrusive</tags>
<dependencies>
<dependency id="jQuery" version="1.8.0" />
<dependency id="jQuery.Validation" version="1.8.0.1" />
</dependencies>
</metadata>
<files>
<file src="dist\jquery.validate.unobtrusive.js" target="Content\Scripts"/>
<file src="dist\jquery.validate.unobtrusive.min.js" target="Content\Scripts"/>
</files>
</package>
18 changes: 18 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file supposed to have a file extension? I should think so, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not need one. Can make it "build.cmd" instead if that's better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To run it we will need to do "msbuild .\build" or "msbuild .\build.cmd" (if we add the .cmd extension)

<ItemGroup>
<VersionFile Include="version"/>
</ItemGroup>
<!-- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" /> -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the commented-out lines needed?

<PropertyGroup>
<!-- <PackageVersion>$(PackageVersion)</PackageVersion> -->
<NuspecPath>"Microsoft.jQuery.Unobtrusive.Validation.nuspec"</NuspecPath>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are quotes needed within this tag?

</PropertyGroup>
<Target Name ="Build">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting: Remove space between Name and =

<ReadLinesFromFile File="@(VersionFile)">
<Output TaskParameter="Lines" PropertyName="PackageVersion"/>
</ReadLinesFromFile>
<Exec Command="npm version --no-git-tag-version --allow-same-version $(PackageVersion)" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking - does this change the package.json file on disk? If so, I'm concerned that someone will check in the updated version by mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the "version" file is updated it picks up that version or stays the same.

<Exec Command="gulp" />
<Exec Command="nuget pack $(NuspecPath) -Version $(PackageVersion)" />
</Target>
</Project>
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.7