-
Notifications
You must be signed in to change notification settings - Fork 242
Automated build for Android APK #878
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
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
64e2824
Use approved verbs
ann0see 3e0c0e7
Add Android build by @nefarius2001
ann0see 4b7b38c
Move flatpak to autobuild
ann0see b6feab3
Fix non working Qt mirror
ann0see 7a39f89
enable building & release for all branches
aa12198
change branch name in flatpack manifest
79cf6b1
fix
6f741fb
cleanup comments & console
aee3013
Revert "Fix non working Qt mirror"
a6fc7dc
cleaner release-tags, remove debug prints (only on error)
708836b
releases only for tags starting with "r", fix for releases
f8444f9
improve build config
2a49151
fix workflow_dispatch
9cf6af2
fix condition
c9d5172
test
8ef26e1
test
f3901c5
testre
66e4cc9
fix
8cfed81
py only
7c2f5aa
fixxx
45fe12b
fffxxx
03b4e60
add perl call
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| #!/usr/bin/python3 | ||
|
|
||
| import sys | ||
| import os | ||
|
|
||
| def get_jamulus_version(repo_path_on_disk): | ||
| jamulus_version = "" | ||
| with open (repo_path_on_disk + '/Jamulus.pro','r') as f: | ||
| pro_content = f.read() | ||
| pro_content = pro_content.replace('\r','') | ||
| pro_lines = pro_content.split('\n') | ||
| for line in pro_lines: | ||
| line = line.strip() | ||
| VERSION_LINE_STARTSWITH = 'VERSION = ' | ||
| if line.startswith(VERSION_LINE_STARTSWITH): | ||
| jamulus_version = line[len(VERSION_LINE_STARTSWITH):] | ||
| return jamulus_version | ||
|
|
||
|
|
||
| if len(sys.argv) == 1: | ||
| repo_path_on_disk = os.environ['GITHUB_WORKSPACE'] | ||
| release_version_name = get_jamulus_version(repo_path_on_disk) | ||
|
|
||
| os.system('perl "{}"/.github/actions_scripts/getChangelog.pl "{}"/ChangeLog "{}" > "{}"/autoLatestChangelog.md'.format( | ||
| os.environ['GITHUB_WORKSPACE'], | ||
| os.environ['GITHUB_WORKSPACE'], | ||
| release_version_name, | ||
| os.environ['GITHUB_WORKSPACE'] | ||
| )) | ||
|
|
||
| elif len(sys.argv) == 4: | ||
| #fullref=sys.argv[1] | ||
| #pushed_name=sys.argv[2] | ||
| release_version_name = sys.argv[3] | ||
| else: | ||
| print('Expecing 4 arguments, 1 script path and 3 parameters') | ||
| print('Number of arguments:', len(sys.argv), 'arguments.') | ||
| print('Argument List:', str(sys.argv)) | ||
| raise Exception("wrong agruments") | ||
|
|
||
| fullref=os.environ['GITHUB_REF'] | ||
| reflist = fullref.split("/", 2) | ||
| pushed_name = reflist[2] | ||
|
|
||
|
|
||
|
|
||
| if fullref.startswith("refs/tags/"): | ||
| print('this reference is a Tag') | ||
| publish_to_release = True | ||
| release_tag = pushed_name # tag already exists | ||
| release_title="Release {} ({})".format(release_version_name, pushed_name) | ||
| if pushed_name.startswith("r"): | ||
| if "beta" in pushed_name: | ||
| print('this reference is a Beta-Release-Tag') | ||
| is_prerelease = True | ||
| else: | ||
| print('this reference is a Release-Tag') | ||
| publish_to_release = True | ||
| is_prerelease = False | ||
| else: | ||
| print('this reference is a Non-Release-Tag') | ||
| publish_to_release = False | ||
| is_prerelease = True # just in case | ||
|
|
||
|
|
||
| if pushed_name == "latest": | ||
| print('this reference is a Latest-Tag') | ||
|
nefarius2001 marked this conversation as resolved.
|
||
| publish_to_release = True | ||
| release_version_name = "latest" | ||
| release_title='Release "latest"' | ||
| elif fullref.startswith("refs/heads/"): | ||
| print('this reference is a Head/Branch') | ||
| publish_to_release = False | ||
| is_prerelease = True | ||
| release_title='Pre-Release of "{}"'.format(pushed_name) | ||
| release_tag = "releasetag/"+pushed_name #better not use pure pushed name, creates a tag with the name of the branch, leads to ambiguous references => can not push to this branch easily | ||
| else: | ||
| print('unknown git-reference type: ' + fullref) | ||
| publish_to_release = False | ||
| is_prerelease = True | ||
| release_title='Pre-Release of "{}"'.format(pushed_name) | ||
| release_tag = "releasetag/"+pushed_name #avoid ambiguity in references in all cases | ||
|
|
||
| def set_github_variable(varname, varval): | ||
| print("{}='{}'".format(varname, varval)) #console output | ||
| print("::set-output name={}::{}".format(varname, varval)) | ||
|
|
||
| set_github_variable("PUBLISH_TO_RELEASE", str(publish_to_release).lower()) | ||
| set_github_variable("IS_PRERELEASE", str(is_prerelease).lower()) | ||
| set_github_variable("RELEASE_TITLE", release_title) | ||
| set_github_variable("RELEASE_TAG", release_tag) | ||
| set_github_variable("PUSHED_NAME", pushed_name) | ||
| set_github_variable("JAMULUS_VERSION", release_version_name) | ||
| set_github_variable("RELEASE_VERSION_NAME", release_version_name) | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.