Skip to content

Commit

Permalink
Create Source tarball using Default ASF Configuration (apache#9184)
Browse files Browse the repository at this point in the history
With this patch we are now using the common ASF configuration to create the "release tarball" to be VOTEd and release during the official VOTE.

Currently in 2.6+ we are 

Changes:
- Use ASF apache-source-release-assembly-descriptor
- Configure the final name of the artifact
- Update the release script src/stage-release.sh used during the release process https://github.com/apache/pulsar/wiki/Release-process
- Remove the old "src" descriptor 

Results:
With this change you will find the apache-pulsar-VERSION-src.tar.gz file inside the main "target" directory.
It contains the dump of the source tree, according to the default Apache rules (basically it strips out only the GIT releated files).

The source tarball that we are going to release and VOTE will be a copy of the git tag from which it has been created

Notes:
in ASF projects usually you are using the -Papache-release profile but it looks like we are not using it always here https://github.com/apache/pulsar/wiki/Release-process

it would be better to activate this package only with a Maven profile, in order to speed up the build when you are not performing a release.
  • Loading branch information
eolivelli authored Jan 21, 2021
1 parent de7b59d commit 0770ae6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 104 deletions.
1 change: 0 additions & 1 deletion distribution/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@
<finalName>apache-pulsar-${project.version}</finalName>
<descriptors>
<descriptor>src/assemble/bin.xml</descriptor>
<descriptor>src/assemble/src.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
99 changes: 0 additions & 99 deletions distribution/server/src/assemble/src.xml

This file was deleted.

34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,40 @@ flexible messaging model and an intuitive client API.</description>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.apache.resources</groupId>
<artifactId>apache-source-release-assembly-descriptor</artifactId>
<version>1.0.6</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>source-release-assembly-tar-gz</id>
<phase>generate-sources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
<descriptorRefs>
<!-- defined in Apache Parent Pom -->
<descriptorRef>${sourceReleaseAssemblyDescriptor}</descriptorRef>
</descriptorRefs>
<finalName>apache-pulsar-${project.version}-src</finalName>
<appendAssemblyId>false</appendAssemblyId>
<formats>
<format>tar.gz</format>
</formats>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
Expand Down
4 changes: 2 additions & 2 deletions pulsar-client-cpp/pkg/deb/build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ POM_VERSION=`$SRC_ROOT_DIR/src/get-project-version.py`
# Sanitize VERSION by removing `SNAPSHOT` if any since it's not legal in DEB
VERSION=`echo $POM_VERSION | awk -F- '{print $1}'`

ROOT_DIR=apache-pulsar-$POM_VERSION
ROOT_DIR=apache-pulsar-$POM_VERSION-src
CPP_DIR=$ROOT_DIR/pulsar-client-cpp

rm -rf BUILD
mkdir BUILD
cd BUILD
tar xfz $SRC_ROOT_DIR/distribution/server/target/apache-pulsar-$POM_VERSION-src.tar.gz
tar xfz $SRC_ROOT_DIR/target/apache-pulsar-$POM_VERSION-src.tar.gz
pushd $CPP_DIR

cmake . -DBUILD_TESTS=OFF -DLINK_STATIC=ON
Expand Down
2 changes: 1 addition & 1 deletion pulsar-client-cpp/pkg/rpm/build-rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ VERSION=`echo $POM_VERSION | awk -F- '{print $1}'`

mkdir -p BUILD RPMS SOURCES SPECS SRPMS

cp $ROOT_DIR/distribution/server/target/apache-pulsar-$POM_VERSION-src.tar.gz SOURCES
cp $ROOT_DIR/target/apache-pulsar-$POM_VERSION-src.tar.gz SOURCES

rpmbuild -v -bb --clean \
--define "version $VERSION" \
Expand Down
2 changes: 1 addition & 1 deletion src/stage-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PULSAR_PATH=$(git rev-parse --show-toplevel)
VERSION=`./get-project-version.py`
popd

cp $PULSAR_PATH/distribution/server/target/apache-pulsar-$VERSION-src.tar.gz $DEST_PATH
cp $PULSAR_PATH/target/apache-pulsar-$VERSION-src.tar.gz $DEST_PATH
cp $PULSAR_PATH/distribution/server/target/apache-pulsar-$VERSION-bin.tar.gz $DEST_PATH
cp $PULSAR_PATH/distribution/offloaders/target/apache-pulsar-offloaders-$VERSION-bin.tar.gz $DEST_PATH

Expand Down

0 comments on commit 0770ae6

Please sign in to comment.