Fix release.py

This commit is contained in:
Zhichang Yu 2024-12-06 22:31:27 +08:00
parent 885418f3b0
commit 8cdb805c0b
3 changed files with 12 additions and 2 deletions

View File

@ -63,6 +63,16 @@ jobs:
fi
fi
- name: Create or overwrite a release
# https://github.com/actions/upload-release-asset has been replaced by https://github.com/softprops/action-gh-release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.MY_GITHUB_TOKEN }} # Use the secret as an environment variable
prerelease: ${{ env.PRERELEASE }}
tag_name: ${{ env.RELEASE_TAG }}
# The body field does not support environment variable substitution directly.
body_path: release_body.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

View File

@ -120,7 +120,7 @@ RUN --mount=type=cache,id=ragflow_npm,target=/root/.npm,sharing=locked \
COPY .git /ragflow/.git
RUN version_info=$(git describe --tags --match=v* --dirty); \
RUN version_info=$(git describe --tags --match=v* --dirty --always); \
if [ "$LIGHTEN" == "1" ]; then \
version_info="$version_info slim"; \
else \

View File

@ -43,7 +43,7 @@ def get_closest_tag_and_count():
try:
# Get the current commit hash
version_info = (
subprocess.check_output(["git", "describe", "--tags", "--match=v*", "--dirty"])
subprocess.check_output(["git", "describe", "--tags", "--match=v*", "--dirty", "--always"])
.strip()
.decode("utf-8")
)