-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ARROW-4839: [C#] Add NuGet package metadata and instructions. #3891
Changes from 4 commits
5c31e1d
c7a9d8d
1566f40
f4bb193
b3c6ab8
89f630b
8c0f680
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,6 @@ pushd csharp | |
|
||
dotnet test || exit /B | ||
|
||
dotnet pack -c Release || exit /B | ||
|
||
popd |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<Project> | ||
|
||
<!-- Common repo directories --> | ||
<PropertyGroup> | ||
<RepoRoot>$(MSBuildThisFileDirectory)../</RepoRoot> | ||
<CSharpDir>$(MSBuildThisFileDirectory)</CSharpDir> | ||
<BaseOutputPath>$(CSharpDir)/artifacts/$(AssemblyName)</BaseOutputPath> | ||
</PropertyGroup> | ||
|
||
<!-- AssemblyInfo properties --> | ||
<PropertyGroup> | ||
<Product>Apache Arrow library</Product> | ||
<Copyright>2018 Apache Software Foundation</Copyright> | ||
<Company>Apache</Company> | ||
<VersionPrefix>0.13.0</VersionPrefix> | ||
<VersionSuffix>preview</VersionSuffix> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<LangVersion>7.2</LangVersion> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>$(CSharpDir)ApacheArrow.snk</AssemblyOriginatorKeyFile> | ||
</PropertyGroup> | ||
|
||
<!-- NuGet properties --> | ||
<PropertyGroup> | ||
<Authors>Apache</Authors> | ||
<PackageIconUrl>https://www.apache.org/images/feather.png</PackageIconUrl> | ||
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile> | ||
<PackageProjectUrl>https://arrow.apache.org/</PackageProjectUrl> | ||
<PackageTags>apache arrow</PackageTags> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/apache/arrow</RepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(IsPackable)' == 'true'"> | ||
<Content Include="$(RepoRoot)LICENSE.txt" Pack="true" PackagePath="" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project> | ||
|
||
<Import Project="..\Directory.Build.props" /> | ||
|
||
<PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -56,6 +56,14 @@ update_versions() { | |||
git add configure.ac meson.build | ||||
cd - | ||||
|
||||
cd "${SOURCE_DIR}/../../csharp" | ||||
sed -i.bak -E -e \ | ||||
"s/^ <VersionPrefix>.+<\/VersionPrefix>/ <VersionPrefix>${version}<\/VersionPrefix>/" \ | ||||
Directory.Build.props | ||||
rm -f Directory.Build.props.bak | ||||
git add Directory.Build.props | ||||
cd - | ||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! How about using empty diff --git a/csharp/Directory.Build.props b/csharp/Directory.Build.props
index fde2ea81..bc0eaa17 100644
--- a/csharp/Directory.Build.props
+++ b/csharp/Directory.Build.props
@@ -13,7 +13,7 @@
<Copyright>2018 Apache Software Foundation</Copyright>
<Company>Apache</Company>
<VersionPrefix>0.13.0</VersionPrefix>
- <VersionSuffix>preview</VersionSuffix>
+ <VersionSuffix>SNAPSHOT</VersionSuffix>
</PropertyGroup>
<PropertyGroup>
diff --git a/csharp/README.md b/csharp/README.md
index 1d8dbf83..1eeec818 100644
--- a/csharp/README.md
+++ b/csharp/README.md
@@ -147,7 +147,7 @@ To build the NuGet package run the following command to build a debug flavor, pr
When building the officially released version run: (see Note below about current `git` repository)
- dotnet pack -c Release -p:VersionSuffix=''
+ dotnet pack -c Release
Which will build the final/stable package.
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index f8a5eddf..27101976 100755
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -29,10 +29,14 @@ update_versions() {
case ${type} in
release)
local version=${base_version}
+ local csharp_version_prefix=${base_version}
+ local csharp_version_suffix=
local r_version=${base_version}
;;
snapshot)
local version=${next_version}-SNAPSHOT
+ local csharp_version_prefix=${next_version}
+ local csharp_version_suffix=SNAPSHOT
local r_version=${base_version}.9000
;;
esac
@@ -57,8 +61,9 @@ update_versions() {
cd -
cd "${SOURCE_DIR}/../../csharp"
- sed -i.bak -E -e \
- "s/^ <VersionPrefix>.+<\/VersionPrefix>/ <VersionPrefix>${version}<\/VersionPrefix>/" \
+ sed -i.bak -E \
+ -e "s/^ <VersionPrefix>.+<\/VersionPrefix>/ <VersionPrefix>${csharp_version_prefix}<\/VersionPrefix>/" \
+ -e "s/^ <VersionSuffix>.*<\/VersionSuffix>/ <VersionSuffix>${csharp_version_suffix}<\/VersionSuffix>/" \
Directory.Build.props
rm -f Directory.Build.props.bak
git add Directory.Build.props We don't use any suffix on release tag. For example, https://github.com/apache/arrow/blob/apache-arrow-0.12.1/cpp/CMakeLists.txt#L21 on apache-arrow-0.12.1 tag. We use "SNAPSHOT" suffix on non release tag. For example, Line 21 in 74436f0
How about using "SNAPSHOT" instead of "preview" in C# too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good call. I am used to using
When I started this work, I didn't know how the versioning was handled in this project. But what you describe above makes sense to me. My concerns when I started were:
However, I now learned that we already have a process for switching out all the version numbers right before "tagging" for a release. This approach makes sense to me. That way if someone pulls the source code for a release and just "builds", they will get a "stable" package, because they built from the tagged commit for that release. I'll make this change, thanks for the feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK. |
||||
# We can enable this when Arrow JS uses the same version. | ||||
# cd "${SOURCE_DIR}/../../js" | ||||
# sed -i.bak -E -e \ | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Apache Software Foundation" may be better.
If we need to change this, we can work on this as a follow-up task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the formal name of the organization is "The Apache Software Foundation"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
@eerhardt Could you create a pull request for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Can I use the same JIRA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be a simple PR without a JIRA since it's not notable for the changelog