Skip to content

Commit 04bb39f

Browse files
committed
Merge pull request #118 in SOLNSC/lib-solutions-python from bug/ITSI-6547 to master
* commit 'ae45ccf80e0be62a9e1f06d17a56107608eb293d': ITSI-6547: Fix before_publish.sh Master branch handling * Don't append a random "-" suffix * Check the right versioned package
2 parents 2ba1b64 + ae45ccf commit 04bb39f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/before_publish.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ cred=$(echo $cred | tr -d ' ')
1111
name=`awk '/^Name: .*$/ {print $2}' solnlib.egg-info/PKG-INFO`
1212
version=`awk '/^__version__.*$/ {print $3}' solnlib/__init__.py | tr -d "\'"`
1313
new_version=`echo $version | sed -e 's/-dev./.dev/g'`
14-
if [[ ! -z "$new_version" ]]
14+
if [[ ! -z "$version_postfix" ]]
1515
then
1616
new_version="${new_version}-${version_postfix}"
1717
fi
1818
sed -i s/"${version}"/"${new_version}"/g solnlib/__init__.py
1919

20-
uri=$(curl -Ssu $cred -GET https://repo.splunk.com/artifactory/api/storage/pypi/$name/$version/$name-$version.tar.gz | node -pe "JSON.parse(require('fs').readFileSync('/dev/stdin').toString()).uri")
20+
uri=$(curl -Ssu $cred -GET https://repo.splunk.com/artifactory/api/storage/pypi/$name/$new_version/$name-$new_version.tar.gz | node -pe "JSON.parse(require('fs').readFileSync('/dev/stdin').toString()).uri")
2121
if [[ $uri == "undefined" ]]
2222
then
2323
echo {\"exists\": false, \"version\":\"${new_version}\"} > upload_check.json
2424
else
2525
echo {\"exists\": true, \"version\":\"${new_version}\"} > upload_check.json
26-
fi
26+
fi

0 commit comments

Comments
 (0)