Skip to content
Permalink
Browse files
AMQNET-590: NMS AMQP Add package script
  • Loading branch information
Havret committed Jul 17, 2019
1 parent 2d565c7 commit 7ef73e713c2b9b85a11cf1150566cfde6612a738
Showing 4 changed files with 136 additions and 47 deletions.
@@ -260,3 +260,4 @@ ModelManifest.xml
# FAKE - F# Make
.fake/
.idea/
package/
File renamed without changes.
@@ -0,0 +1,76 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

$pkgname = "Apache.NMS.AMQP"
$pkgver = "1.8.0"
$frameworks = "netstandard2.0"

write-progress "Creating package directory." "Initializing..."
if (!(test-path package)) {
mkdir package
}
else {
# Clean package content if exists
Remove-Item package\* -Recurse
}

if (test-path build) {
Push-Location build

$pkgdir = "..\package"

write-progress "Packaging Application files." "Scanning..."
$zipfile = "$pkgdir\$pkgname-$pkgver-bin.zip"

Compress-Archive -Path ..\LICENSE.txt, ..\NOTICE.txt -Update -DestinationPath $zipfile

# clean up temp
Remove-Item temp -Recurse -ErrorAction Ignore

foreach ($framework in $frameworks) {
Copy-Item $framework -Destination temp\$framework -Recurse
Compress-Archive -Path "temp\$framework" -Update -DestinationPath $zipfile
}

$nupkg = "$pkgname.$pkgver.nupkg"
$nupkgdestination = "$pkgdir\$nupkg"
Copy-Item -Path $nupkg -Destination $nupkgdestination

# clean up temp
Remove-Item temp -Recurse -ErrorAction Inquire

Pop-Location
}

write-progress "Packaging Source code files." "Scanning..."
$pkgdir = "package"
$zipfile = "$pkgdir\$pkgname-$pkgver-src.zip"

# clean temp dir if exists
Remove-Item temp -Recurse -ErrorAction Ignore

# copy files to temp dir
Copy-Item src -Destination temp\src -Recurse
Copy-Item test -Destination temp\test -Recurse

# clean up debug artifacts if there are any
Get-ChildItem temp -Include bin, obj -Recurse | Remove-Item -Recurse

Compress-Archive -Path temp\*, LICENSE.txt, NOTICE.txt, README.md, apache-nms-amqp.sln, package.ps1 -Update -DestinationPath $zipfile

write-progress "Removing temp files"
Remove-Item temp -Recurse

write-progress -Completed "Packaging" "Complete."
@@ -16,54 +16,66 @@ with the License. You may obtain a copy of the License at
under the License.
-->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Apache.NMS.AMQP</RootNamespace>
<AssemblyName>Apache.NMS.AMQP</AssemblyName>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<PropertyGroup>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<RootNamespace>Apache.NMS.AMQP</RootNamespace>
<AssemblyName>Apache.NMS.AMQP</AssemblyName>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Apache.NMS.AMQP</PackageId>
<Version>1.0.0</Version>
<Authors>Apache ActiveMQ</Authors>
<Company>Apache Software Foundation</Company>
<Product>Apache ActiveMQ NMS AMQP Client</Product>
<Description>Apache ActiveMQ NMS.AMQP provides a NMS based client that uses the AMQP v1.0 protocol.</Description>
<Copyright>Copyright (C) 2005-2019 Apache Software Foundation</Copyright>
<PackageProjectUrl>https://activemq.apache.org/components/nms/</PackageProjectUrl>
<PackageLicense>https://github.com/apache/activemq-nms-amqp/blob/master/NOTICE.txt</PackageLicense>
<PackageIconUrl>https://activemq.apache.org/assets/img/activemq_logo_icon.png</PackageIconUrl>
<RepositoryUrl>https://github.com/apache/activemq-nms-amqp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>apache;activemq;nms;amqp;net;messaging</PackageTags>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<OutputPath>..\..\build\</OutputPath>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<!-- To debug Message dispatch MultiThreading -->
<!-- <DefineConstants>DEBUG;TRACE;TRACELOCKS</DefineConstants> -->
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>Apache.NMS.AMQP</PackageId>
<Version>1.8.0</Version>
<Authors>Apache ActiveMQ</Authors>
<Company>Apache Software Foundation</Company>
<Product>Apache ActiveMQ NMS AMQP Client</Product>
<Description>Apache ActiveMQ NMS.AMQP provides a NMS based client that uses the AMQP v1.0 protocol.</Description>
<Copyright>Copyright (C) 2005-2019 Apache Software Foundation</Copyright>
<PackageProjectUrl>https://activemq.apache.org/components/nms/</PackageProjectUrl>
<PackageLicense>https://github.com/apache/activemq-nms-amqp/blob/master/NOTICE.txt</PackageLicense>
<PackageIconUrl>https://activemq.apache.org/assets/img/activemq_logo_icon.png</PackageIconUrl>
<RepositoryUrl>https://github.com/apache/activemq-nms-amqp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>apache;activemq;nms;amqp;net;messaging</PackageTags>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

<ItemGroup>
<!-- AMQPNetLite.Core is .NET Standard 1.3 package -->
<PackageReference Include="AMQPNetLite.Core" Version="2.1.7" />
<PackageReference Include="Apache.NMS" Version="1.8.0" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="LICENSE.txt"/>
<None Include="..\..\NOTICE.txt" Pack="true" PackagePath="NOTICE.txt"/>
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<!-- To debug Message dispatch MultiThreading -->
<!-- <DefineConstants>DEBUG;TRACE;TRACELOCKS</DefineConstants> -->
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

<ItemGroup>
<!-- AMQPNetLite.Core is .NET Standard 1.3 package -->
<PackageReference Include="AMQPNetLite.Core" Version="2.1.7"/>
<PackageReference Include="Apache.NMS" Version="1.8.0"/>
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0"/>
</ItemGroup>
</Project>

0 comments on commit 7ef73e7

Please sign in to comment.