forked from termux/termux-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea548da
commit 4831239
Showing
353 changed files
with
49,860 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,20 @@ | ||
# Copying and distribution of this file, with or without modification, | ||
# are permitted in any medium without royalty provided this notice is | ||
# preserved. This file is offered as-is, without any warranty. | ||
|
||
# EditorConfig | ||
# http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.y{a,}ml] | ||
indent_size = 2 | ||
indent_style = space |
This file contains 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,5 @@ | ||
* text=auto | ||
*.bat text eol=crlf | ||
*.gradle text eol=lf | ||
*.mk text eol=lf | ||
*.sh text eol=lf |
This file contains 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 @@ | ||
custom: https://termux.dev/donate |
This file contains 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,44 @@ | ||
name: "Bug report" | ||
description: "Create a report to help us improve" | ||
title: "[Bug]: " | ||
labels: ["bug report"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
This is a bug tracker of the Termux app. If you have issues with a package inside the app, then please open an issue at [termux-packages](https://github.com/termux/termux-packages) instead. | ||
Use search before you open an issue to check whether your issue has been already reported and perhaps solved. | ||
Android versions 5.x and 6.x are not supported anymore. | ||
If you have issues installing packages then please see https://github.com/termux/termux-packages/issues/6726. | ||
- type: textarea | ||
attributes: | ||
label: Problem description | ||
description: | | ||
A clear and concise description of what the problem is. You may attach the logs, screenshots, screen video recording and whatever else that will help to understand the issue. | ||
Issues without proper description will be closed without solution. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps to reproduce the behavior. | ||
description: | | ||
Please post all necessary commands that are needed to reproduce the issue. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: What is the expected behavior? | ||
- type: textarea | ||
attributes: | ||
label: System information | ||
description: Please provide info about your device | ||
value: | | ||
* Termux application version: | ||
* Android OS version: | ||
* Device model: | ||
validations: | ||
required: true |
This file contains 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,19 @@ | ||
name: "Feature request" | ||
description: "Suggest a new feature for Termux application" | ||
title: "[Feature]: " | ||
labels: ["feature request"] | ||
body: | ||
- type: textarea | ||
attributes: | ||
label: Feature description | ||
description: Describe the feature and why you want it. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Additional information | ||
description: | | ||
Does another app/terminal emulator have this feature? | ||
Provide links to more background information. | ||
validations: | ||
required: true |
This file contains 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,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Want ask questions about the project? | ||
url: https://github.com/termux/termux-app/discussions | ||
about: Join GitHub Discussions |
This file contains 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,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily | ||
commit-message: | ||
# Prefix all commit messages with "Changed: " | ||
prefix: "Changed" |
This file contains 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,73 @@ | ||
name: Attach Debug APKs To Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package_variant: [ apt-android-7, apt-android-5 ] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ env.GITHUB_REF }} | ||
|
||
- name: Build | ||
shell: bash {0} | ||
env: | ||
PACKAGE_VARIANT: ${{ matrix.package_variant }} | ||
run: | | ||
RELEASE_VERSION_NAME="${GITHUB_REF/refs\/tags\//}" | ||
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then | ||
echo "The versionName '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html." | ||
exit 1 | ||
fi | ||
APK_DIR_PATH="./app/build/outputs/apk/debug" | ||
APK_VERSION_TAG="$RELEASE_VERSION_NAME+${{ env.PACKAGE_VARIANT }}-github-debug" | ||
APK_BASENAME_PREFIX="termux-app_$APK_VERSION_TAG" | ||
echo "Building APKs for 'APK_VERSION_TAG' release" | ||
export TERMUX_APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle | ||
export TERMUX_PACKAGE_VARIANT="${{ env.PACKAGE_VARIANT }}" # Used by app/build.gradle | ||
./gradlew assembleDebug | ||
echo "Validating APKs" | ||
for abi in universal arm64-v8a armeabi-v7a x86_64 x86; do | ||
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk"; then | ||
files_found="$(ls "$APK_DIR_PATH")" | ||
echo "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk'. Files found: "$'\n'"$files_found" | ||
exit 1 | ||
fi | ||
done | ||
- name: Upload APKs to GitHub artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.package_variant }} | ||
path: ./app/build/outputs/apk/debug/*.apk | ||
upload: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
- name: Upload APKs to release | ||
uses: termux/upload-release-action@v4.2.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: "**/*.apk" | ||
file_glob: true | ||
release_name: | ||
tag: ${{ github.event.release.tag_name }} | ||
checksums: sha256,sha512,md5 |
This file contains 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,126 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
package_variant: [ apt-android-7, apt-android-5 ] | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build APKs | ||
shell: bash {0} | ||
env: | ||
PACKAGE_VARIANT: ${{ matrix.package_variant }} | ||
run: | | ||
exit_on_error() { echo "$1"; exit 1; } | ||
echo "Setting vars" | ||
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then | ||
GITHUB_SHA="${{ github.event.pull_request.head.sha }}" # Do not use last merge commit set in GITHUB_SHA | ||
fi | ||
# Set RELEASE_VERSION_NAME to "<CURRENT_VERSION_NAME>+<last_commit_hash>" | ||
CURRENT_VERSION_NAME_REGEX='\s+versionName "([^"]+)"$' | ||
CURRENT_VERSION_NAME="$(grep -m 1 -E "$CURRENT_VERSION_NAME_REGEX" ./app/build.gradle | sed -r "s/$CURRENT_VERSION_NAME_REGEX/\1/")" | ||
RELEASE_VERSION_NAME="v$CURRENT_VERSION_NAME+${GITHUB_SHA:0:7}" # The "+" is necessary so that versioning precedence is not affected | ||
if ! printf "%s" "${RELEASE_VERSION_NAME/v/}" | grep -qP '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'; then | ||
exit_on_error "The versionName '${RELEASE_VERSION_NAME/v/}' is not a valid version as per semantic version '2.0.0' spec in the format 'major.minor.patch(-prerelease)(+buildmetadata)'. https://semver.org/spec/v2.0.0.html." | ||
fi | ||
APK_DIR_PATH="./app/build/outputs/apk/debug" | ||
APK_VERSION_TAG="$RELEASE_VERSION_NAME-${{ env.PACKAGE_VARIANT }}-github-debug" # Note the "-", GITHUB_SHA will already have "+" before it | ||
APK_BASENAME_PREFIX="termux-app_$APK_VERSION_TAG" | ||
# Used by attachment steps later | ||
echo "APK_DIR_PATH=$APK_DIR_PATH" >> $GITHUB_ENV | ||
echo "APK_VERSION_TAG=$APK_VERSION_TAG" >> $GITHUB_ENV | ||
echo "APK_BASENAME_PREFIX=$APK_BASENAME_PREFIX" >> $GITHUB_ENV | ||
echo "Building APKs for 'APK_VERSION_TAG' build" | ||
export TERMUX_APP_VERSION_NAME="${RELEASE_VERSION_NAME/v/}" # Used by app/build.gradle | ||
export TERMUX_APK_VERSION_TAG="$APK_VERSION_TAG" # Used by app/build.gradle | ||
export TERMUX_PACKAGE_VARIANT="${{ env.PACKAGE_VARIANT }}" # Used by app/build.gradle | ||
if ! ./gradlew assembleDebug; then | ||
exit_on_error "Build failed for '$APK_VERSION_TAG' build." | ||
fi | ||
echo "Validating APKs" | ||
for abi in universal arm64-v8a armeabi-v7a x86_64 x86; do | ||
if ! test -f "$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk"; then | ||
files_found="$(ls "$APK_DIR_PATH")" | ||
exit_on_error "Failed to find built APK at '$APK_DIR_PATH/${APK_BASENAME_PREFIX}_$abi.apk'. Files found: "$'\n'"$files_found" | ||
fi | ||
done | ||
echo "Generating sha25sums file" | ||
if ! (cd "$APK_DIR_PATH"; sha256sum \ | ||
"${APK_BASENAME_PREFIX}_universal.apk" \ | ||
"${APK_BASENAME_PREFIX}_arm64-v8a.apk" \ | ||
"${APK_BASENAME_PREFIX}_armeabi-v7a.apk" \ | ||
"${APK_BASENAME_PREFIX}_x86_64.apk" \ | ||
"${APK_BASENAME_PREFIX}_x86.apk" \ | ||
> "${APK_BASENAME_PREFIX}_sha256sums"); then | ||
exit_on_error "Generate sha25sums failed for '$APK_VERSION_TAG' release." | ||
fi | ||
- name: Attach universal APK file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_universal | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_universal.apk | ||
${{ env.APK_DIR_PATH }}/output-metadata.json | ||
- name: Attach arm64-v8a APK file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_arm64-v8a | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_arm64-v8a.apk | ||
${{ env.APK_DIR_PATH }}/output-metadata.json | ||
- name: Attach armeabi-v7a APK file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_armeabi-v7a | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_armeabi-v7a.apk | ||
${{ env.APK_DIR_PATH }}/output-metadata.json | ||
- name: Attach x86_64 APK file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_x86_64 | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_x86_64.apk | ||
${{ env.APK_DIR_PATH }}/output-metadata.json | ||
- name: Attach x86 APK file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_x86 | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_x86.apk | ||
${{ env.APK_DIR_PATH }}/output-metadata.json | ||
- name: Attach sha256sums file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.APK_BASENAME_PREFIX }}_sha256sums | ||
path: | | ||
${{ env.APK_DIR_PATH }}/${{ env.APK_BASENAME_PREFIX }}_sha256sums | ||
${{ env.APK_DIR_PATH }}/output-metadata.json |
This file contains 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,19 @@ | ||
name: "Validate Gradle Wrapper" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- android-10 | ||
pull_request: | ||
branches: | ||
- master | ||
- android-10 | ||
|
||
jobs: | ||
validation: | ||
name: "Validation" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: gradle/wrapper-validation-action@v2 |
This file contains 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,21 @@ | ||
name: Unit tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- android-10 | ||
pull_request: | ||
branches: | ||
- master | ||
- android-10 | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
- name: Execute tests | ||
run: | | ||
./gradlew test |
This file contains 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,21 @@ | ||
name: Trigger Termux Library Builds on Jitpack | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
trigger-termux-library-builds: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set vars | ||
run: echo "TERMUX_LIB_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV # Do not include "v" prefix | ||
- name: Echo release | ||
run: echo "Triggering termux library builds on jitpack for '$TERMUX_LIB_VERSION' release after waiting for 3 mins" | ||
- name: Trigger termux library builds on jitpack | ||
run: | | ||
sleep 180 # It will take some time for the new tag to be detected by Jitpack | ||
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/terminal-emulator/$TERMUX_LIB_VERSION/terminal-emulator-$TERMUX_LIB_VERSION.pom" | ||
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/terminal-view/$TERMUX_LIB_VERSION/terminal-view-$TERMUX_LIB_VERSION.pom" | ||
curl --max-time 600 --no-progress-meter "https://jitpack.io/com/termux/termux-app/termux-shared/$TERMUX_LIB_VERSION/termux-shared-$TERMUX_LIB_VERSION.pom" |
Oops, something went wrong.