Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

bintray.sh potential errors creating new packages #102

Open
ryane opened this issue Jun 3, 2016 · 1 comment
Open

bintray.sh potential errors creating new packages #102

ryane opened this issue Jun 3, 2016 · 1 comment
Assignees

Comments

@ryane
Copy link
Contributor

ryane commented Jun 3, 2016

It looks like the bintray.sh might have some issues creating packages that don't already exist. I tried to use the script as is in https://github.com/asteris-llc/mantl-private-packaging and ran into problems. The check to determine if the pkg exists used the versioned name ($PKG) instead of the base name ($PKG_NAME). Also, the PKG_METADATA variable did not seem to be properly quoted and the vars were included literally in the JSON and resulted in a bintray api error. This looks like it occurred here for example:

https://travis-ci.org/asteris-llc/mantl-packaging/builds/133152641#L353

In that example, it looks like the script tried to create the package even though it already existed in Bintray because of the check using $PKG instead of $PKG_NAME as described above.

Here is the version I am using in the private repo which appears to work correctly: https://github.com/asteris-llc/mantl-private-packaging/blob/master/scripts/bintray.sh

@langston-barrett
Copy link
Contributor

In general, shellcheck is great for avoiding quoting errors in shell scripts (and many other issues).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants