#!/bin/bash

G_SYNOPSIS="

 NAME

	pypi.sh

 SYNOPSIS

	pypi.sh <name> <ver>

 ARGS
 	<name>
	The repo name.

	<ver>
	A version string to upload. Typically something like '0.20.22'.

 DESCRIPTION

	pypi.sh is a simple helper script to tag and upload a new version of pypi.sh 


"

if (( $# != 1 )) ; then
    echo "$G_SYNOPSIS"
    exit 1
fi

NAME=$1
VER=$2

git commit -am "v${VER}"
git push origin master
git tag $VER
git push origin --tags

rstcheck README.rst
python3 setup.py sdist
twine upload dist/${NAME}-${VER}.tar.gz


#!/bin/bash

G_SYNOPSIS="

 NAME

	pypi.sh

 SYNOPSIS

	pypi.sh <ver>

 ARGS

	<ver>
	A version string to upload. Typically something like '0.20.22'.

 DESCRIPTION

	pypi.sh is a simple helper script to tag and upload a new version of pypi.sh 


"

if (( $# != 1 )) ; then
    echo "$G_SYNOPSIS"
    exit 1
fi

VER=$1

git commit -am "v${VER}"
git push origin master
git tag $VER
git push origin --tags

rstcheck README.rst
python3 setup.py sdist
twine upload dist/pman-${VER}.tar.gz


--- 
+++ 
@@ -8,9 +8,11 @@
 
  SYNOPSIS
 
-	pypi.sh <ver>
+	pypi.sh <name> <ver>
 
  ARGS
+ 	<name>
+	The repo name.
 
 	<ver>
 	A version string to upload. Typically something like '0.20.22'.
@@ -27,7 +29,8 @@
     exit 1
 fi
 
-VER=$1
+NAME=$1
+VER=$2
 
 git commit -am "v${VER}"
 git push origin master
@@ -36,5 +39,5 @@
 
 rstcheck README.rst
 python3 setup.py sdist
-twine upload dist/pman-${VER}.tar.gz
+twine upload dist/${NAME}-${VER}.tar.gz
 
Update script with NAME arg.
