Skip to content

Commit 211c0c2

Browse files
committed
Add doc for script installFromGitHub.sh
1 parent 451df75 commit 211c0c2

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

docs/installing_from_ci.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
## Installing from CI
2+
3+
<!--- TOC -->
4+
5+
* [Installing from Buildkite](#installing-from-buildkite)
6+
* [Installing from GitHub](#installing-from-github)
7+
* [Create a GitHub token](#create-a-github-token)
8+
* [Provide artifact URL](#provide-artifact-url)
9+
* [Next steps](#next-steps)
10+
11+
<!--- END -->
12+
13+
Installing APK build by the CI is possible
14+
15+
### Installing from Buildkite
16+
17+
The script `./tools/install/installFromBuildkite.sh` can be used, but Builkite will be removed soon. See next section.
18+
19+
### Installing from GitHub
20+
21+
To install an APK built by a GitHub action, run the script `./tools/install/installFromGitHub.sh`. You will need to pass a GitHub token to do so.
22+
23+
#### Create a GitHub token
24+
25+
You can create a GitHub token going to your Github account, at this page: [https://github.com/settings/tokens](https://github.com/settings/tokens).
26+
27+
You need to create a token (classic) with the scope `repo/public_repo`. So just check the corresponding checkbox.
28+
Validity can be long since the scope of this token is limited. You will still be able to delete the token and generate a new one.
29+
Click on Generate token and save the token locally.
30+
31+
### Provide artifact URL
32+
33+
The script will ask for an artifact URL. You can get this artifact URL by following these steps:
34+
35+
- open the pull request
36+
- in the check at the bottom, click on `APK Build / Build debug APKs`
37+
- click on `Summary`
38+
- scroll to the bottom of the page
39+
- copy the link `vector-Fdroid-debug` if you want the F-Droid variant or `vector-Gplay-debug` if you want the Gplay variant.
40+
41+
The copied link can be provided to the script.
42+
43+
### Next steps
44+
45+
The script will download the artifact, unzip it and install the correct version (regarding arch) on your device.
46+
47+
Files will be added to the folder `./tmp/DebugApks`. Feel free to cleanup this folder from time to time, the script will not delete files.
48+
49+
### Future improvement
50+
51+
The script could ask the user for a Pull Request number and Gplay/Fdroid choice like it was done with Buildkite script. Using GitHub API may be possible to do that.

tools/install/installFromGitHub.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
set -e
55

66
if [[ "$#" -ne 1 ]]; then
7-
echo "Usage: $0 GitHub_token" >&2
7+
echo "Usage: $0 GitHub_Token" >&2
8+
echo "Read more about this script in the doc ./docs/installing_from_ci.md"
89
exit 1
910
fi
1011

0 commit comments

Comments
 (0)