Skip to content
Myr

publish

This file

Path

scripts/publish

26 lines · 592 bytes

Last changed by

Fix VERSION_FILE in publish script. (#916)Tom Christiebefore adoption3010261

History of this file

Take it

The walk stopped after 200 commits: lines older than 7d45db0 point at it.

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

lines 1–2why, one step back
1#!/bin/sh -e
2

Fix VERSION_FILE in publish script. (#916)Tom Christiebefore adoption3010261

line 3why, one step back
3VERSION_FILE="httpx/__version__.py"

Publish workflow (#913)Tom Christiebefore adoptione586e5d

line 4why, one step back
4

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

line 5why, one step back
5if [ -d 'venv' ] ; then

Publish workflow (#913)Tom Christiebefore adoptione586e5d

lines 6–8why, one step back
6 PREFIX="venv/bin/"
7else8 PREFIX=""

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

lines 9–10why, one step back
9fi
10

Publish workflow (#913)Tom Christiebefore adoptione586e5d

lines 11–13why, one step back
11if [ ! -z "$GITHUB_ACTIONS" ]; then
12 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"13 git config --local user.name "GitHub Action"

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

line 14why, one step back
14

Publish workflow (#913)Tom Christiebefore adoptione586e5d

line 15why, one step back
15 VERSION=`grep __version__ ${VERSION_FILE} | grep -o '[0-9][^"]*'`

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

line 16why, one step back
16

Publish workflow (#913)Tom Christiebefore adoptione586e5d

lines 17–18why, one step back
17 if [ "refs/tags/${VERSION}" != "${GITHUB_REF}" ] ; then
18 echo "GitHub Ref '${GITHUB_REF}' did not match package version '${VERSION}'"

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

line 19why, one step back
19 exit 1

Publish workflow (#913)Tom Christiebefore adoptione586e5d

line 20why, one step back
20 fi

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

lines 21–22why, one step back
21fi
22

Publish workflow (#913)Tom Christiebefore adoptione586e5d

line 23why, one step back
23set -x

Link to ASGI docs (#577)Tom Christiebefore adoption7d45db0

lines 24–25why, one step back
24
25${PREFIX}twine upload dist/*

Publish workflow (#913)Tom Christiebefore adoptione586e5d

line 26why, one step back
26${PREFIX}mkdocs gh-deploy --force