Skip to content

Commit

Permalink
Re-work release logic (PaddlePaddle#4221)
Browse files Browse the repository at this point in the history
* fix release logic

* workflow

* add version file
sijunhe authored Dec 23, 2022
1 parent 1816c85 commit 36e78fa
Showing 8 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyPI
name: Release

on:
workflow_dispatch:
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -60,8 +60,6 @@ deploy-paddle-pipelines:
deploy-paddlenlp:
# install related package
make install
# deploy version
echo "VERSION = '$$(cat VERSION)'" > paddlenlp/version.py
# build
python3 setup.py sdist bdist_wheel
# upload
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

1 change: 1 addition & 0 deletions paddlenlp/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.6
7 changes: 4 additions & 3 deletions paddlenlp/__init__.py
Original file line number Diff line number Diff line change
@@ -12,11 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from .version import VERSION

__version__ = VERSION # Maybe dev is better
import os
import sys

with open(os.path.join(os.path.dirname(__file__), "VERSION")) as fp:
__version__ = fp.read().strip()

if "datasets" in sys.modules.keys():
from paddlenlp.utils.log import logger

17 changes: 0 additions & 17 deletions paddlenlp/version.py

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/should_deploy.py
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ def read_version_of_local_package(version_file_path: str) -> str:
args = parser.parse_args()

version_file_map = {
"paddlenlp": "VERSION",
"paddlenlp": "paddlenlp/VERSION",
"ppdiffusers": "ppdiffusers/VERSION",
"paddle-pipelines": "pipelines/VERSION",
}
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -11,9 +11,12 @@
# 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.
import io
import os

import setuptools
import io

from paddlenlp import __version__


def read_requirements_file(filepath):
@@ -58,7 +61,7 @@ def get_package_data_files(package, data, package_dir=None):

setuptools.setup(
name="paddlenlp",
version="2.4.1.dev", # modify this for each release
version=__version__,
author="PaddleNLP Team",
author_email="paddlenlp@baidu.com",
description="Easy-to-use and powerful NLP library with Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including Neural Search, Question Answering, Information Extraction and Sentiment Analysis end-to-end system.",

0 comments on commit 36e78fa

Please sign in to comment.