Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
command: pack
packagesToPack: 'ReactAndroid/ReactAndroid.nuspec'
packDestination: '$(Build.StagingDirectory)\final'
buildProperties: buildNumber=$(buildNumber);commitId=$(Build.SourceVersion)

- task: CmdLine@2
displayName: Do Publish
Expand Down
4 changes: 2 additions & 2 deletions .ado/templates/prep-android-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
steps:
- task: PowerShell@2
displayName: Extract version from package.json, and put it in nuspec
displayName: Extract version from package.json, and put it in `buildNumber` variable
inputs:
targetType: inline # filePath | inline
script: |
$lines = Get-Content package.json | Where {$_ -match '^\s*"version":.*'}
$npmVersion = $lines.Trim().Split()[1].Trim('",');
(Get-Content ReactAndroid/ReactAndroid.nuspec).replace('__BuildBuildNumber__', $npmVersion) | Set-Content ReactAndroid/ReactAndroid.nuspec
echo "##vso[task.setvariable variable=buildNumber]$($npmVersion)"

# Pretty yucky - but we dont want devmain to have to update versions _all_ over the place
- task: PowerShell@2
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/ReactAndroid.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>OfficeReact.Android</id>
<version>__BuildBuildNumber__</version>
<version>$buildNumber$</version>
<description>Contains Android Implementation of React-Native</description>
<authors>Microsoft</authors>
<projectUrl>https://github.com/microsoft/react-native</projectUrl>
<repository type="git" url="https://github.com/microsoft/react-native.git" commit="$commitId$" />
<requireLicenseAcceptance>false</requireLicenseAcceptance>
</metadata>

Expand Down
2 changes: 1 addition & 1 deletion ReactApple/ReactApple.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>OfficeReact.Apple</id>
<version>__BuildBuildNumber__</version>
<version>$buildNumber$</version>
<description>Contains Mac and iOS Implementations of React-Native</description>
<authors>Microsoft</authors>
<projectUrl>https://github.com/microsoft/react-native</projectUrl>
Expand Down