File: publish

package info (click to toggle)
python-uvicorn 0.32.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,636 kB
  • sloc: python: 8,853; sh: 100; makefile: 13
file content (26 lines) | stat: -rwxr-xr-x 591 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e

VERSION_FILE="uvicorn/__init__.py"

if [ -d 'venv' ] ; then
    PREFIX="venv/bin/"
else
    PREFIX=""
fi

if [ ! -z "$GITHUB_ACTIONS" ]; then
  git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
  git config --local user.name "GitHub Action"

  VERSION=`grep __version__ ${VERSION_FILE} | grep -o '[0-9][^"]*'`

  if [ "refs/tags/${VERSION}" != "${GITHUB_REF}" ] ; then
    echo "GitHub Ref '${GITHUB_REF}' did not match package version '${VERSION}'"
    exit 1
  fi
fi

set -x

${PREFIX}twine upload dist/*
${PREFIX}mkdocs gh-deploy --force