~hristoast/mousikofidi

ref: dev mousikofidi/pypi-upload.sh -rwxr-xr-x 621 bytes
00265fa1Hristos N. Triantafillou Use the right method to provide track metadata via the API (#138) a month ago
                                                                                
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
27
#!/bin/bash

script_dir="$(realpath $(dirname ${0}))"

exact_tag=$(git describe --exact-match --tags HEAD -- 2>/dev/null)
tag_stat=$?

if git diff-index --quiet HEAD --; then
    if [ $tag_stat = 0 ]; then
        if ( echo $exact_tag | grep beta ); then
            echo This is a "beta" release, not publishing...
            exit 0
        fi
        cat <<EOF > ~/.pypirc
[pypi]
username = __token__
password = $(cat ~/.fidipypi)
EOF
        twine upload "${script_dir}"/dist/*
    else
        echo This is not a tag!  Exiting...
        exit 0
    fi
else
    echo Local changes detected!  Exiting...
    exit 0
fi