Skip to content

Commit deb95b4

Browse files
author
yuzelin
committed
fix?
1 parent f790b45 commit deb95b4

File tree

3 files changed

+49
-18
lines changed

3 files changed

+49
-18
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: Create Source Release
17+
18+
on:
19+
workflow_dispatch:
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v2
28+
29+
- name: Create source release
30+
run: |
31+
mkdir -p output
32+
chmod +x tools/releasing/create_source_release.sh
33+
OUTPUT_DIR=output tools/releasing/create_source_release.sh
34+
35+
- name: Upload source release
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: source-release
39+
path: output/*

.github/workflows/paimon-python-checks.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,8 @@ jobs:
4343
with:
4444
java-version: ${{ env.JDK_VERSION }}
4545
distribution: 'adopt'
46-
- name: Set up hadoop dependency
47-
run: |
48-
mkdir -p ${{ github.workspace }}/temp
49-
curl -L -o ${{ github.workspace }}/temp/bundled-hadoop.jar \
50-
https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar
46+
5147
- name: Run lint-python.sh
52-
env:
53-
_PYPAIMON_HADOOP_CLASSPATH: ${{ github.workspace }}/temp/bundled-hadoop.jar
5448
run: |
5549
chmod +x dev/lint-python.sh
5650
./dev/lint-python.sh

tools/releasing/create_source_release.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
#
1919

2020
##
21-
## Required variables
21+
## set output directory
2222
##
23-
RELEASE_VERSION=${RELEASE_VERSION}
23+
OUTPUT_DIR=${OUTPUT_DIR}
2424

25-
if [ -z "${RELEASE_VERSION}" ]; then
26-
echo "RELEASE_VERSION was not set"
25+
if [ -z "${OUTPUT_DIR}" ]; then
26+
echo "OUTPUT_DIR was not set"
2727
exit 1
2828
fi
2929

@@ -63,9 +63,8 @@ if grep -q "<version>.*SNAPSHOT</version>" "pom.xml"; then
6363
exit 1
6464
fi
6565

66-
# get version
66+
# get bridge jar version
6767
JAR_VERSION=$(sed -n 's/.*<version>\(.*\)<\/version>.*/\1/p' pom.xml | head -n 1)
68-
echo $JAR_VERSION
6968

7069
mvn clean install -DskipTests
7170
cp "target/paimon-python-java-bridge-${JAR_VERSION}.jar" ${DEPS_DIR}
@@ -74,9 +73,8 @@ cd ${CURR_DIR}
7473

7574
# build source release
7675

77-
RELEASE_DIR=${PROJECT_ROOT}/release
78-
rm -rf ${RELEASE_DIR}
79-
mkdir -p ${RELEASE_DIR}
76+
# get release version
77+
RELEASE_VERSION=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' ${PROJECT_ROOT}/pypaimon/version.py)
8078

8179
# use lint-python.sh script to create a python environment.
8280
dev/lint-python.sh -s basic
@@ -85,9 +83,9 @@ source dev/.conda/bin/activate
8583
python setup.py sdist
8684
conda deactivate
8785
WHEEL_FILE_NAME="pypaimon-${RELEASE_VERSION}.tar.gz"
88-
cp "dist/${WHEEL_FILE_NAME}" "${RELEASE_DIR}/${WHEEL_FILE_NAME}"
86+
cp "dist/${WHEEL_FILE_NAME}" "${OUTPUT_DIR}/${WHEEL_FILE_NAME}"
8987

90-
cd ${RELEASE_DIR}
88+
cd ${OUTPUT_DIR}
9189

9290
# Sign sha the wheel package
9391
gpg --armor --detach-sig ${WHEEL_FILE_NAME}

0 commit comments

Comments
 (0)