Closed aferrero2707 closed 7 years ago
the Travis build is re-triggered by the updating of the "continuous" tag
Add to your .travis.yml
:
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/
the old draft releases do not seem to be deleted
Yes, I experience the same issue - don't know the reason yet. Seems like one of the $delete_url
is sometimes empty and the release doesn't get deleted:
Delete the release...
delete_url:
the old draft releases do not seem to be deleted
5386d01 may have fixed this.
Nope... need help on this, can't seem to get it to work properly. How hard can it be?
I think this is the culprit:
Create release...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 445 100 246 100 199 3218 2603 --:--:-- --:--:-- --:--:-- 3369
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://developer.github.com/v3/repos/releases/#create-a-release"
}
Indeed I see authentication failures from time to time... see here for example: https://travis-ci.org/aferrero2707/PhotoFlow/builds/175451362
However, sometimes it work perfectly...
It is a complete mystery to me...
A possible clue: one release was created as a draft, the next one as a pre-release. See screenshot: https://filebin.net/3u7helqokb3g0jgt, or directly the github releases page: https://github.com/aferrero2707/PhotoFlow/releases
The draft could not be deleted by the last travis job...
Yes, I somehow that seems related, I just don't know exactly how...
Could you make your script more verbose?
No, then it'd leak the API key...
In my last test, there was an existing "Continuous" pre-release on GitHub, and the Travis job was supposed to replace it with a newer one. What happened is that the previous release was not deleted, and was turned into a Draft instead, and the new appimage and travis log file were not uploaded.
The travis log is here: https://travis-ci.org/aferrero2707/PhotoFlow/builds/176180229
Again, there seems to be a problem with the certificate and/or the URL of the release being deleted:
Delete the release...
delete_url: https://api.github.com/repos/aferrero2707/PhotoFlow/releases/tags/continuous
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
Checking if release with the same name is still there...
curl: (58) unable to use client certificate (no key found or wrong pass phrase?)
I see the same symptoms but don't know the solution...
I will make some further tests with the upload tool locally on my machine, where I can safely expose the github token and make the script more verbose...
In case you are interested, I am working on an alternative upload script that does not delete the existing "continuous" release. Instead, it will rotate the binary packages so that only the most recent 5 are kept.
This is because I want to use the continuous release to store other packages that are manually uploaded, and therefore I do not want to have the release deleted by the travis script.
Here is the link to the alternative script: https://github.com/aferrero2707/uploadtool/blob/master/upload_rotate.sh
The packages rotation is still not implemented, but I will certainly work on that during the next few days...
Works for me now @aferrero2707 thank you very much for your help!
@aferrero2707 With your script, it seems like a more polished version of the upload script here. Would it be suitable for making a PR from to get it into this repo?
PRs welcome, as long as they don't break the existing stuff.
I have started testing the upload tool on my project, and it is really awesome! However, I have a couple of problems:
Any idea of what I could be doing wrong?
My Travis configuration is associated with the "stable" branch (the one in the master branch is not updated...)
Thanks!