Skip to content

Commit

Permalink
[FLINK-9748][release] Use dedicated directory for release artifacts
Browse files Browse the repository at this point in the history
This closes apache#6342.
  • Loading branch information
zentol committed Jul 19, 2018
1 parent c5b3d17 commit 749dd29
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ out/
*.iws
tools/flink
tools/flink-*
tools/releasing/release
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ under the License.
<!-- Tools: watchdog -->
<exclude>tools/artifacts/**</exclude>
<exclude>tools/flink*/**</exclude>
<!-- artifacts created during release process -->
<exclude>tools/releasing/release/**</exclude>
<!-- manually installed version on travis -->
<exclude>apache-maven-3.2.5/**</exclude>
<!-- PyCharm -->
Expand Down
15 changes: 10 additions & 5 deletions tools/releasing/create_binary_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ else
SHASUM="sha512sum"
fi

cd ..

FLINK_DIR=`pwd`
RELEASE_DIR=${FLINK_DIR}/tools/releasing/release
mkdir -p ${RELEASE_DIR}

###########################

# build maven package, create Flink distribution, generate signature
Expand All @@ -65,18 +71,17 @@ make_binary_release() {
cd flink-dist/target/flink-*-bin/
tar czf "${dir_name}.tgz" flink-*

cp flink-*.tgz ../../../
cd ../../../
cp flink-*.tgz ${RELEASE_DIR}
cd ${RELEASE_DIR}

# Sign sha the tgz
if [ "$SKIP_GPG" == "false" ] ; then
gpg --armor --detach-sig "${dir_name}.tgz"
fi
$SHASUM "${dir_name}.tgz" > "${dir_name}.tgz.sha512"
}

cd ..

cd ${FLINK_DIR}
}

if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then
make_binary_release "" "-DwithoutHadoop" "2.11"
Expand Down
21 changes: 13 additions & 8 deletions tools/releasing/create_source_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,17 @@ fi

cd ..

FLINK_DIR=`pwd`
RELEASE_DIR=${FLINK_DIR}/tools/releasing/release
CLONE_DIR=${RELEASE_DIR}/flink-tmp-clone

echo "Creating source package"

mkdir -p ${RELEASE_DIR}

# create a temporary git clone to ensure that we have a pristine source release
git clone . flink-tmp-clone
cd flink-tmp-clone
git clone ${FLINK_DIR} ${CLONE_DIR}
cd ${CLONE_DIR}

rsync -a \
--exclude ".git" --exclude ".gitignore" --exclude ".gitattributes" --exclude ".travis.yml" \
Expand All @@ -58,10 +64,9 @@ rsync -a \
--exclude "docs/content" --exclude ".rubydeps" \
. flink-$RELEASE_VERSION

tar czf flink-${RELEASE_VERSION}-src.tgz flink-$RELEASE_VERSION
gpg --armor --detach-sig flink-$RELEASE_VERSION-src.tgz
$SHASUM flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.sha512
tar czf ${RELEASE_DIR}/flink-${RELEASE_VERSION}-src.tgz flink-$RELEASE_VERSION
gpg --armor --detach-sig ${RELEASE_DIR}/flink-$RELEASE_VERSION-src.tgz
$SHASUM ${RELEASE_DIR}/flink-$RELEASE_VERSION-src.tgz > ${RELEASE_DIR}/flink-$RELEASE_VERSION-src.tgz.sha512

mv flink-$RELEASE_VERSION-src.* ../
cd ..
rm -rf flink-tmp-clone
cd ${CURR_DIR}
rm -rf ${CLONE_DIR}

0 comments on commit 749dd29

Please sign in to comment.