newpipe-documentation/05_releasing/index.html

290 lines
16 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>Releasing a new NewPipe version - NewPipe Documentation</title>
<!-- local fonts -->
<link rel="stylesheet" href="../css/local_fonts.css" type="text/css" />
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<!-- local code syntax highlighting -->
<link rel="stylesheet" href="../css/github.min.css" type="text/css" />
<link rel="stylesheet" href="../css/highlight.css" type="text/css" />
<script>
// Current page data
var mkdocs_page_name = "Releasing a new NewPipe version";
var mkdocs_page_input_path = "05_releasing.md";
var mkdocs_page_url = null;
</script>
<script src="../js/jquery-2.1.1.min.js" defer></script>
<script src="../js/modernizr-2.8.3.min.js" defer></script>
<script src="../js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> NewPipe Documentation</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1">
<a class="" href="..">Welcome to the NewPipe Documentation.</a>
</li>
<li class="toctree-l1">
<a class="" href="../00_Prepare_everything/">Prepare everything</a>
</li>
<li class="toctree-l1">
<a class="" href="../01_Concept_of_the_extractor/">Concept of the Extractor</a>
</li>
<li class="toctree-l1">
<a class="" href="../02_Concept_of_LinkHandler/">Concept of LinkHandler</a>
</li>
<li class="toctree-l1">
<a class="" href="../03_Implement_a_service/">Implement a service</a>
</li>
<li class="toctree-l1">
<a class="" href="../04_Run_changes_in_App/">Run the changes in the App</a>
</li>
<li class="toctree-l1 current">
<a class="current" href="./">Releasing a new NewPipe version</a>
<ul class="subnav">
<li class="toctree-l2"><a href="#releasing-a-new-newpipe-version">Releasing a new NewPipe version</a></li>
<ul>
<li><a class="toctree-l3" href="#difference-between-regular-and-hotfix-release">Difference between regular and hotfix release</a></li>
<li><a class="toctree-l3" href="#regular-releases">Regular releases</a></li>
<li><a class="toctree-l3" href="#hotfix-releases">Hotfix releases</a></li>
<li><a class="toctree-l3" href="#versioning">Versioning</a></li>
<li><a class="toctree-l3" href="#release-notes">Release notes</a></li>
</ul>
</ul>
</li>
<li class="toctree-l1">
<a class="" href="../06_documentation/">Documentation</a>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">NewPipe Documentation</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Releasing a new NewPipe version</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<h1 id="releasing-a-new-newpipe-version">Releasing a new NewPipe version</h1>
<p>This site is ment for those who want to maintain NewPipe, or just want to know how releasing work.</p>
<p><img alt="one does not simply push to master" src="../img/onedoes.jpg" /></p>
<h2 id="difference-between-regular-and-hotfix-release">Difference between regular and hotfix release</h2>
<p>NewPipe is a web crawler. That means it does not use a web API, but instead tries to scrape the data from the website,
this however has the disadvantage of the app to brake instantly when Youtube changes something.
We can not know when this happen therefore we need to be prepared when it happens, and at lease reduce our downtime as
god as possible. Our whole release cycle is therefore designed around this issue.</p>
<p>So there is a difference between a release that is meant to introduce new features or fix minor bugs,
and a version that fixes an issue that occurred because Youtube (or some other service) suddenly changed their website (mostly call this a shutdown).
Lets first have a look how a regular release work, and then how the hotfix release work.</p>
<h2 id="regular-releases">Regular releases</h2>
<p>Regular releases are normal releases like they are done like 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 current releases. No development is done on master. This ensures that we always have one
branch with a stable/releasable version.</p>
<h3 id="feature-branching">Feature branching</h3>
<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 pushing to <strong>dev</strong>.
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><img alt="feature_branching" src="../img/feature_branch.svg" /></p>
<h3 id="merging-featuresbugfixes">Merging features/bugfixes</h3>
<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 corrosion or code shifting can be prevented. Please also preface core quality over functionality.
So in short: cool function but bad code -&gt; no merge. We should focus on leaving the code as clean as possible.</p>
<p><img alt="merge_feature_into_dev" src="../img/merge_into_dev.svg" /></p>
<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.</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 <a href="#release-notes">release note</a>.</p>
<h3 id="creating-a-new-release">Creating a new release</h3>
<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>
<ol>
<li>Fork the <strong>dev</strong> branch into a new <strong>release_x.y.z</strong> branch.</li>
<li>Increase the <a href="#versioning">version number</a></li>
<li>Copy the <a href="#release-notes">release note</a> from the github version draft into the corresponding fastlane file (see <a href="#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_&lt;versionNumber&gt;_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>
</ol>
<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>
<h3 id="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>.
Increase the version number in the filename of the Release candidate. e.g. <code>NewPipe_&lt;versionNumber&gt;_RC2.apk</code> etc. <em>Don't update the actuall version number however :P</em>.</p>
<p><img alt="release_branch" src="../img/release_branch.svg" /></p>
<h3 id="releasing">Releasing</h3>
<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 <a href="#create_a_new_release">created a new release</a> and maybe having done <a href="#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 <img alt="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>
</ol>
<p><img alt="rebase_back" src="../img/rebase_back_release.svg" /></p>
<h2 id="hotfix-releases">Hotfix releases</h2>
<p><img alt="this_is_fine" src="../img/could_not_decrypt.png" /></p>
<h3 id="fix-branch">Fix branch</h3>
<h3 id="releasing_1">Releasing</h3>
<h2 id="versioning">Versioning</h2>
<p>Versioning NewPipe is simple.</p>
<ul>
<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 increasing 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 increased 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 increased if there are just smaller bug fixes or features added to the app.</li>
</ul>
<h4 id="versioning-the-extractor">Versioning the extractor</h4>
<p>The extractor is always released together with the app, therefore the version number of the extractor is the same as the one of the app.</p>
<h4 id="version-code">Version code</h4>
<p>In android an app can also have a <a href="https://developer.android.com/studio/publish/versioning">versionCode</a>. This code is a <code>long integer</code> and can be increased by any value to show a device that a new version is there.
For NewPipe the version code will be increased 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>
<h2 id="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 <a href="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>&lt;versionCode&gt;.txt</code> (whereas <code>&lt;versionCode&gt;</code> needs to be the version code of the comming release). This file must be stored in the direcotry <a href="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
changes done on the app.</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../06_documentation/" class="btn btn-neutral float-right" title="Documentation">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../04_Run_changes_in_App/" class="btn btn-neutral" title="Run the changes in the App"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<span><a href="../04_Run_changes_in_App/" style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../06_documentation/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme.js" defer></script>
<script src="../search/main.js" defer></script>
</body>
</html>