File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,8 @@ field of the same name in the `.nupkg`.
114114* ` projectUrl `
115115* ` iconUrl `
116116* ` licenseUrl `
117+ * ` repositoryType `
118+ * ` repositoryUrl `
117119* ` copyright `
118120* ` requireLicenseAcceptance ` (` true ` or ` false ` )
119121* ` tags `
Original file line number Diff line number Diff line change @@ -162,6 +162,14 @@ module internal NupkgWriter =
162162 !! " authors" ( core.Authors |> String.concat " , " )
163163 if optional.Owners <> [] then !! " owners" ( String.Join( " , " , optional.Owners))
164164 (!!?) " licenseUrl" optional.LicenseUrl
165+ match optional.RepositoryType, optional.RepositoryUrl with
166+ | Some t, Some url ->
167+ let d = XElement( ns + " repository" )
168+ d.SetAttributeValue( XName.Get " type" , t)
169+ d.SetAttributeValue( XName.Get " url" , url)
170+ metadataNode.Add d
171+ | _ -> ()
172+
165173 (!!?) " projectUrl" optional.ProjectUrl
166174 (!!?) " iconUrl" optional.IconUrl
167175 if optional.RequireLicenseAcceptance then
Original file line number Diff line number Diff line change @@ -2070,6 +2070,8 @@ type ProjectFile with
20702070 IconUrl = prop " IconUrl"
20712071 LicenseUrl = prop " LicenseUrl"
20722072 Copyright = prop " Copyright"
2073+ RepositoryType = prop " RepositoryType"
2074+ RepositoryUrl = prop " RepositoryUrl"
20732075 RequireLicenseAcceptance = propMap " RequireLicenseAcceptance" false tryBool
20742076 Tags = propMap " Tags" [] splitString
20752077 DevelopmentDependency = propMap " DevelopmentDependency" false tryBool
@@ -2086,4 +2088,4 @@ type ProjectFile with
20862088 InterprojectReferencesConstraint = propMap " InterprojectReferencesConstraint" None InterprojectReferencesConstraint.Parse
20872089 }
20882090
2089- ( coreInfo, optionalInfo)
2091+ ( coreInfo, optionalInfo)
Original file line number Diff line number Diff line change @@ -146,6 +146,8 @@ type OptionalPackagingInfo =
146146 ProjectUrl : string option
147147 IconUrl : string option
148148 LicenseUrl : string option
149+ RepositoryUrl : string option
150+ RepositoryType : string option
149151 Copyright : string option
150152 RequireLicenseAcceptance : bool
151153 Tags : string list
@@ -171,6 +173,8 @@ type OptionalPackagingInfo =
171173 Language = None
172174 ProjectUrl = None
173175 LicenseUrl = None
176+ RepositoryUrl = None
177+ RepositoryType = None
174178 IconUrl = None
175179 Copyright = None
176180 RequireLicenseAcceptance = false
@@ -531,6 +535,8 @@ module internal TemplateFile =
531535 Language = get " language"
532536 ProjectUrl = get " projectUrl"
533537 IconUrl = get " iconUrl"
538+ RepositoryType = get " repositoryType"
539+ RepositoryUrl = get " repositoryUrl"
534540 LicenseUrl = get " licenseUrl"
535541 Copyright = get " copyright"
536542 RequireLicenseAcceptance = requireLicenseAcceptance
You can’t perform that action at this time.
0 commit comments