Skip to content

Commit 499eef6

Browse files
authored
[feat][build] Use git-archive to generate source release (apache#20981)
Signed-off-by: tison <[email protected]>
1 parent 64cd753 commit 499eef6

File tree

3 files changed

+5
-139
lines changed

3 files changed

+5
-139
lines changed

pom.xml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,34 +1850,6 @@ flexible messaging model and an intuitive client API.</description>
18501850
</execution>
18511851
</executions>
18521852
</plugin>
1853-
<plugin>
1854-
<groupId>org.apache.maven.plugins</groupId>
1855-
<artifactId>maven-assembly-plugin</artifactId>
1856-
<version>${maven-assembly-plugin.version}</version>
1857-
<inherited>false</inherited>
1858-
<executions>
1859-
<execution>
1860-
<id>source-release-assembly-tar-gz</id>
1861-
<phase>generate-sources</phase>
1862-
<goals>
1863-
<goal>single</goal>
1864-
</goals>
1865-
<configuration>
1866-
<skipAssembly>${skipSourceReleaseAssembly}</skipAssembly>
1867-
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
1868-
<descriptors>
1869-
<descriptor>src/assembly-source-package.xml</descriptor>
1870-
</descriptors>
1871-
<finalName>apache-pulsar-${project.version}-src</finalName>
1872-
<appendAssemblyId>false</appendAssemblyId>
1873-
<formats>
1874-
<format>tar.gz</format>
1875-
</formats>
1876-
<tarLongFileMode>posix</tarLongFileMode>
1877-
</configuration>
1878-
</execution>
1879-
</executions>
1880-
</plugin>
18811853
</plugins>
18821854

18831855
<pluginManagement>

src/assembly-source-package.xml

Lines changed: 0 additions & 110 deletions
This file was deleted.

src/stage-release.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@ if [ $# -eq 0 ]; then
2626
fi
2727

2828
DEST_PATH=$1
29+
DEST_PATH="$(cd "$DEST_PATH" && pwd)"
2930

3031
pushd $(dirname "$0")
3132
PULSAR_PATH=$(git rev-parse --show-toplevel)
3233
VERSION=`./get-project-version.py`
3334
popd
3435

35-
cp $PULSAR_PATH/target/apache-pulsar-$VERSION-src.tar.gz $DEST_PATH
36+
pushd "$(dirname "$0")/.."
37+
git archive --format=tar.gz --output="$DEST_PATH/apache-pulsar-$VERSION-src.tar.gz" --prefix="apache-pulsar-$VERSION-src/" HEAD
38+
popd
39+
3640
cp $PULSAR_PATH/distribution/server/target/apache-pulsar-$VERSION-bin.tar.gz $DEST_PATH
3741
cp $PULSAR_PATH/distribution/offloaders/target/apache-pulsar-offloaders-$VERSION-bin.tar.gz $DEST_PATH
3842
cp $PULSAR_PATH/distribution/shell/target/apache-pulsar-shell-$VERSION-bin.tar.gz $DEST_PATH

0 commit comments

Comments
 (0)