-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add branch info into release builds #4141
Comments
Note how it'll also still need to work for F-Droid, which will check out a certain tag, which might not be the latest commit on master. |
At the very least, in case this change risks disrupting anything, as a last resort the build.gradle could have this code in comments /*
applicationIdSuffix ".debug." + normalizedWorkingBranch
resValue "string", "app_name", "NewPipe " + workingBranch
archivesBaseName = 'NewPipe_' + normalizedWorkingBranch
*/ so that it takes marginally less work than before. |
@wb9688 then there is another way: just to add a new build configuration which can be used by devs. It should be inherited from "release". Something like "releaseLocally". |
@TobiGr Ja? |
pr {
multiDexEnabled true
// suffix the app id and the app name with git branch name
def workingBranch = getGitWorkingBranch()
def normalizedWorkingBranch = workingBranch.replaceFirst("^[^A-Za-z]+", "").replaceAll("[^0-9A-Za-z]+", "")
if (normalizedWorkingBranch.isEmpty() || workingBranch == "master" || workingBranch == "dev") {
// default values when branch name could not be determined or is master or dev
applicationIdSuffix ".releaseTest"
resValue "string", "app_name", "NewPipe Test"
} else {
applicationIdSuffix "." + normalizedWorkingBranch
resValue "string", "app_name", "NewPipe " + workingBranch
archivesBaseName = 'NewPipe_' + normalizedWorkingBranch
}
} Apart from that, we also need to change
not sure, what else needs to be changed |
Describe the feature you want
I want to see support of custom branches (i.e. branches for PR makers) inside release part of build.gradle file. For now there is only such support for debug build type but not for release.
Is your feature request related to a problem? Please describe it
Right now when I make some code changes for PR I have to specify
here: https://github.com/TeamNewPipe/NewPipe/blob/dev/app/build.gradle#L55
Because users asks me about release build instead of debug build. Debug build is terribly slow because of enabled debugging (this is expected behaviour for all apps).
Additional context
Just make the same thing from debug build with release build (set resValue and applicationIdSuffix if workingBranch != "master" && workingBranch != "dev")
How will you/everyone benefit from this feature?
Developers will not need to write this info for every PR they do after you make proposed change.
The text was updated successfully, but these errors were encountered: