<p>Regular releases are normal releases like they are done in any other app. Releases are always stored on <strong>master</strong> branch. By means the latest commit on
<strong>master</strong> is always equal to the currently released version. No development is done on master. This ensures that we always have one
<p>For development the <strong>dev</strong> branch is used. Pushing to <strong>dev</strong> directly however is also not allowed since QA and testing should be done before adding something to it.
This ensures that also the dev version works as good a possible.
So in order to change something on the app one may want to <strong>fork</strong> the dev branch and develop the changes in his own branch (this is called feature branching).</p>
<p>Make sure that both the dev branches as well as the master branches of the extractor and the frontend are compatible to each other.
If a change is done on the API to the extractor make sure that frontend is being made compatible to these changes. If the PR that should make the frontend compatible
again can not be merged please do not merge the corresponding PR on the extractor as well. This should make sure that any developer can run his changes
<p>After being done with the feature one should open up a <strong>Pull Reuqest</strong> to the dev branch here a maintainer can do <strong>Code review</strong> and <strong>Quality Assurance (QA)</strong>.
If you are a maintainer please take care about the code architecture so <strong>corrosion</strong> or <strong>code shifting</strong> can be prevented. Please also prefare code quality over functionality.
<p>At best you as a maintainer should build the app and put the signed apk into the description of that new pullrequest. This way other people can test the feature/bugfix and therefore help with QA. <em>You may not need to do this every time. It is enough to do it on bigger pull requests.</em></p>
<p>After the maintainer merged the new feature into the dev branch he should add the title of the pullrequest or a summary of the changes into the <ahref="#release-notes">release note</a>.</p>
<p>Once there are enough features together, and the maintainer feels like releasing he should create a new release. Here is a list of things he will want to do then.
Be aware of the rule that a release should never be done on a frieday. For NewPipe this mean don't do a release if you don't have time for it!!!</p>
<li>Merge <ahref="https://hosted.weblate.org/projects/newpipe/">weblate</a> changes from <code>dev</code> branch at <code>https://hosted.weblate.org/git/newpipe/strings/</code>.</li>
<li>Copy the <ahref="#release-notes">release note</a> from the github version draft into the corresponding fastlane file (see <ahref="#release-notes">release note</a>).</li>
<li>Open up a pullrequest form the new <strong>release_x.y.z</strong> branch into the <strong>master</strong> branch.</li>
<li>Create an Issue pointing to the new Pullrequest. The reason for opening an issue is that from my perception more people are reading issues then they read pullrequests. Put the release-note into this pull request.</li>
<li>Build a signed release version of NewPipe using schabis signing keys. This is a release candidate (RC). Name the build apk file <code>NewPipe_<versionNumber>_RC1.apk</code>.
Zip it and post it into the head of the release issue. This way other people can test the release candidate.</li>
<li>Test and QA the new version with the help of other people</li>
<li>Leave the PR open for a few days and advertise people to help testing.</li>
<p>While being in release phase no new pullrequests must be merged into <strong>dev</strong> branch.</p>
<p>This procedure does not have to be done for the extractor as extractor will be tested together with the fronted.</p>
<h3id="quckfixes">Quckfixes</h3>
<p>When issuing a new release you will most likely encounter new bugs. These bugs are called <strong>regressions</strong> as they where not there before.
If you notice a regression during release phase you are allowed to push fixes directly into the release branch without having to fork a branch away from it.
All maintainers (people who have write access to the release branch) have to be aware that they might be required to fix regressions so plan your release on a time when
you have time for coding. Do not introduce new features while being in release phase.</p>
<p>When you have pushed a quickfix you will want to updated the <strong>release candidate</strong> you put into the <strong>issue</strong> corresponding to the <strong>release pull request</strong>.
Increment the version number in the filename of the Release candidate. e.g. <code>NewPipe_<versionNumber>_RC2.apk</code> etc. <em>Don't update the actuall version number however :P</em>.</p>
<p>Once the glories day of all days has come, and you feel like fulfilling the ceremony of releasing. This is what you will want to do.
After going through the release procedure of having <ahref="#create_a_new_release">created a new release</a> and maybe having done <ahref="#quickfixes">quickfixes</a> on the new release,
you will want to do these steps:</p>
<ol>
<li>Hit merge Pullreqest</li>
<li>Create a GPG signed tag with the name <code>v0.x.y</code></li>
<li>Merge <strong>dev</strong> into master on the extractor</li>
<li>Create a GPG signed tag with the name <code>v0.x.y</code> on the extractor</li>
<li>Make sure the draft name equals the tag name <imgalt="draft_name"src="../img/draft_name.png"/></li>
<li>Make sure to not have forgotten enything</li>
<li>Hit <code>Publish Release</code></li>
<li>Rebase quickfix changes back into <strong>dev</strong> if quickfixes where made</li>
<p>As described aboth NewPipe is a web crawler, and therefore might brake randomly. In order to keep the downtime of NewPipe as low as possible when such a shutdown happens
we allow so called <strong>hotfixes</strong>.</p>
<ul>
<li>A hotfix allows work on the master branch instead of the dev branch.</li>
<li>A hotfix MUST <strong>NOT</strong> contain any features or other bugfixes.</li>
<li>A hotfix may only focus on fixing what has caused the shutdown.</li>
</ul>
<h3id="hotfix-branch">Hotfix branch</h3>
<p>Hotfixes work on the master branch. The reason for this is because dev branch might have experimental changes that have not yet been tested properly enough to be released. Master however should always be at the latest stable version of NewPipe. If this one brakes due to a shutdown you may therefore want to fix that version.
Of course you are not allowed to push to master directly so you will have to open up a <strong>hotfix</strong> branch. <em>If someone else is pushing a hotfix into master, and it works this can be considered as hotfix branch as well.</em></p>
<p>If you fixed the issue and found it to be tested and reviewed well enough you man release. Here you don't need to undergo the full release procedure of a regular release, which might take up to a few days.
Keep in mind that if the hotfix might turn out to be broken after release you want to release another hotfix.
Here it is important to release fast, and after all a less broken version of NewPipe is better then a full broken version ¯\_(ツ)_/¯.
This is what you will want to do when releasing a hotfix version.</p>
<ol>
<li>Hit merge Pullreqest</li>
<li>Create a GPG signed tag with the name <code>v0.x.y</code></li>
<li>Merge <strong>dev</strong> into master on the extractor</li>
<li>Create a GPG signed tag with the name <code>v0.x.y</code> on the extractor</li>
<li>Create a new release draft and write the down the fix into the release note</li>
<li>Copy the <ahref="#release_notes">release note</a> into the fastlane directory of releases</li>
<li>Increment the <strong>small minor</strong> version number and the <code>versionCode</code></li>
<li>Hit <code>Publish Release</code></li>
<li>Rebase the hotfix back into <strong>dev</strong> branch</li>
<li><strong>Major</strong>: The <strong>major</strong> version number (the number before the first dot) was 0 for years. The reason for this changed over time. First I wanted this number to
switch to 1 once NewPipe was feature complete. Now I rather think of incrementing this number to 1 once we can ensure that NewPipe runs stable (part of which this documentation should help). After this (2 and beyond) well god knows what happens if we ever reach 1 ¯\_(ツ)_/¯ .</li>
<li><strong>Minor</strong>: The <strong>minor</strong> version number (the number after the first dot) will be incremented if there is a major feature added to the app.</li>
<li><strong>Small Minor</strong>: The small minor (the number after the second dot) will be incremented if there are just smaller bug fixes or features added to the app.</li>
<p>In android an app can also have a <ahref="https://developer.android.com/studio/publish/versioning">versionCode</a>. This code is a <code>long integer</code> and can be incremented by any value to show a device that a new version is there.
For NewPipe the version code will be incremented by 10 regardless of the change of the major or minor version number. The version codes between the 10 steps
are reserved for our internal fdroid build server.</p>
<h2id="release-notes">Release notes</h2>
<p>Release notes should give the user an idea of what was changed on the app. The release nodes for NewPipe are stored in the <ahref="https://github.com/TeamNewPipe/NewPipe/releases/tag/v0.14.0">github draft for a new release</a>. When a maintainer wants to add change to the release note, but there is no draft for a new version he should create one.</p>
<p>Changes can be categorized into three types.</p>
<ul>
<li><strong>New</strong>: New features that god added to the app.</li>
<li><strong>Improved</strong>: Improvements to the app, or already existing features</li>
<li><strong>Fixes</strong>: Bugfixes</li>
</ul>
<p>When releasing a new version of NewPipe, before actually hitting release the maintainer should copy the release note from the draft and put it into a file called
<code><versionCode>.txt</code> (whereas <code><versionCode></code> needs to be the version code of the comming release). This file must be stored in the direcotry <ahref="https://github.com/teamnewpipe/newpipe/tree/dev/fastlane/metadata/android/en-US/changelogs"><code>/fastlane/metadata/android/en-US/changelogs</code></a>. This way fdroid will later be able to show the
<ahref="../04_Run_changes_in_App/"class="btn btn-neutral"title="Run the changes in the App"><spanclass="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<divrole="contentinfo">
<!-- Copyright etc -->
</div>
Built with <ahref="http://www.mkdocs.org">MkDocs</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.