-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upload even if list of branches is empty #2438
upload even if list of branches is empty #2438
Conversation
I'm realizing that the travis builds won't be uploaded to bintray if there is no bintray package already created with that branch name...see very end of this build log: https://travis-ci.org/ericfont/MuseScore/jobs/114816133 I'm going to see if there is a way I can have travis tell bintray to automatically create the package if it doesn't exist... I'm sorry for all the edits...let me verify this |
I found what I need in the bintray API, under section "Create Package": POST /packages/:subject/:repo standby...let me verify this & update PR. |
hmm...apparenltly bintray.sh already tries to make package here: https://github.com/musescore/MuseScore/blob/master/build/travis/job2_AppImage/bintray.sh#L213-L224 let me investigae why it doesn't... And I'm considering maybe using the wildcard "*" for APPIMAGE_UPLOAD_BRANCHES to indicate upload all branches... |
oh I see {"message":"forbidden"} is response. The reason is becuase bintray.sh sets variable BINTRAY_REPO_OWNER="musescore". I think the solution is to use environment varialbe, just like BINTRAY_USER=$BINTRAY_USER # envdoes |
regarding the BINTRAY_REPO_OWNER, I submitted a seperate PR #2440, which is a separate issue from this PR, so you can consider this two PR's independently. |
I think I prefer the wildcard since it gives the ability to have none, a list of branches, or all branches. While hardcoding empty to all doesn't give none as an option. |
OK. Unfortunately my bash skills are poor. I actually had trouble evaluating wildcard... I'm about to go to sleep now...if you know how to do that go ahead now, if not I'll try to implement wildcard tomorrow. |
No hurry. Have a good night! |
@ericfont doesn't the else cover it for you? Call build.sh like this: ./build.sh # this uploads on every branch ./build.sh --upload-branches # this uploads on no branches ./build.sh --upload-branches master 2.0.3 # this uploads only on "master" and "2.0.3" Edit: it probably makes sense to have a wildcard in light of this commit. That way you can set $APPIMAGE_UPLOAD_BRANCHES="wildcard" inside the Travis environment rather than patching .travis.yml every time you build. Maybe use "ALL" rather than "*" as the wildcard to avoid problems if someone tries to run it on the shell. |
that else doesn't cover it. Becuse I wanted a way to control the build script using ONLY environment variables. Since the "--upload-brances" is hardcoded into code, then user would have to modify the .travis.yml, which I don't want. I am thinking "ALL" will be the best, as I discovered exactly that issue you describe where "*" was resolving to all files in current directory :) |
ALL is fine for me. |
bbb3ee3
to
bfd8c52
Compare
I would like my personal travis to upload all my personal branches to my personal bintray. To accomplish this, if the Travis environment variable $APPIMAGE_UPLOAD_BRANCHES is set to the specific string "ALL", then the command "./build/travis/job2_AppImage/build.sh --upload-branches $APPIMAGE_UPLOAD_BRANCHES" will upload all branches. But, if user leaves the $APPIMAGE_UPLOAD_BRANCHES undefined, then that command won't upload any branches.
bfd8c52
to
60d1c6f
Compare
ok...I've recommited, such that "--upload-branches ALL" will upload all branches. Here is new commit title "allow Travis to upload ALL branches to bintray" and new commit message: I would like my personal travis to upload all my personal branches to my personal bintray. To accomplish this, if the Travis environment variable $APPIMAGE_UPLOAD_BRANCHES is set to the specific string "ALL", then the command "./build/travis/job2_AppImage/build.sh --upload-branches $APPIMAGE_UPLOAD_BRANCHES" will upload all branches. But, if user leaves the $APPIMAGE_UPLOAD_BRANCHES undefined, then that command won't upload any branches. I tested those bash lines in a little test bash script on my terminal, and behaves as I've described. |
…branches-empty upload even if list of branches is empty
I would like my personal travis to upload all my personal branches to my personal bintray.
If travis environment variable $APPIMAGE_UPLOAD_BRANCHES isn't defined, then "./build/travis/job2_AppImage/build.sh" will have the same default behavior as if did not even use the parameter "--upload-branches".