Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dhis2/dhis2-android-capture-app
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.0.0.1
Choose a base ref
...
head repository: dhis2/dhis2-android-capture-app
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 1,417 changed files with 32,909 additions and 39,506 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -11,6 +11,11 @@ on:
- main
- develop
- release/*
pull_request:
branches:
- main
- develop
- release/*

jobs:
deployment_job:
93 changes: 0 additions & 93 deletions .github/workflows/continuous-integration.yml

This file was deleted.

31 changes: 8 additions & 23 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -18,25 +18,20 @@ on:
description: 'tag'
required: true
type: string
is_patch:
description: 'Is the new version a patch'
required: true
type: boolean
default: false


jobs:
Build-Apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- name: Read version name from file
working-directory: ./gradle
id: read-version
run: echo "::set-output name=vName::$(grep 'vName' libs.versions.toml | awk -F' = ' '{print $2}' | tr -d '"')"
- name: Set Up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
@@ -65,23 +60,13 @@ jobs:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.dhis2
releaseFiles: ${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk
track: alpha
track: production
status: inProgress
whatsNewDirectory: whatsnew
userFraction: 0.99


- name: Github Patch Release
if: ${{ (inputs.github_release == true) && (inputs.is_patch == true) }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
generateReleaseNotes: true
name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }}) - Patch version"
tag: ${{ inputs.release_tag_name }}
artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk

- name: Github New Release
if: ${{ (inputs.github_release == true) && (inputs.is_patch == false) }}
- name: Upload to Github
if: ${{ inputs.github_release }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
17 changes: 7 additions & 10 deletions .github/workflows/release-generate-notes.yml
Original file line number Diff line number Diff line change
@@ -22,19 +22,16 @@ jobs:
steps:

- uses: actions/checkout@v3
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

# Generate github release notes
- name: Generate release notes
working-directory: ./scripts
run: python3 generateReleaseNotes.py

- name: setup git config
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<android@dhis2.org>"
- name: Commit changes
run: |
# Commit and push
git commit -am "Update release notes"
git push
uses: flex-development/gh-commit@1.0.0
with:
message: "Update release notes"
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
78 changes: 45 additions & 33 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
@@ -2,11 +2,8 @@

name: Release start

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
release_version_name:
description: 'New release version name'
@@ -18,72 +15,87 @@ on:
required: true
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
create_branch:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ inputs.release_version_name }}
RELEASE_BRANCH: 'release/${{ inputs.release_version_name }}'
TEMP_RELEASE_BRANCH: 'tmp_release/${{ inputs.release_version_name }}'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12.1

- name: setup git config
# Creates an auxiliary branch. This branch will be used to create the signed commit using the GH API.
# It is required to use an auxiliary branch because the RELEASE_BRANCH is protected and the GH API
# rejects the commit even though the user identified by the token is included in the bypass list.
- name: Create auxiliary branch
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<android@dhis2.org>"
# override vName with new version
- name: Create release branch
run: git checkout -b release/${{ inputs.release_version_name }}
git checkout -b ${{ env.TEMP_RELEASE_BRANCH }}
git push origin ${{ env.TEMP_RELEASE_BRANCH }}
- name: Run Python script to update release branch version
run: python scripts/updateVersionName.py ${{ inputs.release_version_name }}
run: python scripts/updateVersionName.py ${{ env.RELEASE_VERSION }}

# Uses the GH API to create the signed commit.
- name: Commit and Push Changes to auxiliary branch
uses: flex-development/gh-commit@1.0.0
with:
message: 'Update version to ${{ env.RELEASE_VERSION }}'
ref: ${{ env.TEMP_RELEASE_BRANCH }}
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Push
# Fetch the remote commit (signed commit) and create a new branch with the RELEASE_BRANCH name.
# This is required because the RELEASE_BRANCH is protected.
- name: Create and push release branch
run: |
git add .
git commit -m "Update version to ${{ inputs.release_version_name }}"
git push origin release/${{ inputs.release_version_name }}
git reset --hard
git pull origin ${{ env.TEMP_RELEASE_BRANCH }}
git checkout -b ${{ env.RELEASE_BRANCH }}
git push origin ${{ env.RELEASE_BRANCH }}
git push origin --delete ${{ env.TEMP_RELEASE_BRANCH }}
update_version:
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
DEVELOPMENT_VERSION: ${{ inputs.development_version_name }}
DEVELOPMENT_BRANCH: 'update_version_to${{ inputs.development_version_name }}'

steps:
- name: Check out code
uses: actions/checkout@v4
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12.1

- name: setup git config
- name: Create development branch
run: |
# setup the username and email.
git config user.name "GitHub Actions Bot"
git config user.email "<android@dhis2.org>"
- name: Create release branch
run: git checkout -b update_version_to${{ inputs.development_version_name }}
git checkout -b ${{ env.DEVELOPMENT_BRANCH }}
git push origin ${{ env.DEVELOPMENT_BRANCH }}
- name: Run Python script to update base branch version
run: python scripts/updateVersionName.py ${{ inputs.development_version_name }}
run: python scripts/updateVersionName.py ${{ env.DEVELOPMENT_VERSION }}

- name: Commit and Push Changes
run: |
git add .
git commit -m "Update version to ${{ inputs.development_version_name }}"
git push origin update_version_to${{ inputs.development_version_name }}
uses: flex-development/gh-commit@1.0.0
with:
message: 'Update version to ${{ env.DEVELOPMENT_VERSION }}'
ref: ${{ env.DEVELOPMENT_BRANCH }}
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: create pull request
run: gh pr create -B develop -H update_version_to${{ inputs.development_version_name }} --title 'Merge update_version_to${{ inputs.development_version_name }} into develop' --body 'Created by Github action'
- name: Create pull request
run: gh pr create -B develop -H update_version_to${{ env.DEVELOPMENT_VERSION }} --title 'Merge ${{ env.DEVELOPMENT_BRANCH }} into develop' --body 'Created by Github action'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -11,3 +11,4 @@
/venv
/*.secrets.yml
/gradle.deps
.kotlin/
7 changes: 7 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -57,3 +57,10 @@ source_file = compose-table/src/main/res/values/strings.xml
source_lang = en
type = ANDROID
minimum_perc = 0

[o:hisp-uio:p:dhis2-android-capture-app:r:tracker-strings-xml]
file_filter = tracker/src/main/res/values-<lang>/strings.xml
source_file = tracker/src/main/res/values/strings.xml
source_lang = en
type = ANDROID
minimum_perc = 0
11 changes: 9 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
//Sets cron schedule just for PUSH job
String cron_string = JOB_NAME.startsWith('android-multibranch-PUSH') ? '0 0 * * *' : ''

pipeline {
agent {
label "ec2-android"
}

triggers {
cron(cron_string)
}

options {
buildDiscarder(logRotator(daysToKeepStr: '5'))
timeout(time: 50)
@@ -87,8 +94,8 @@ pipeline {
stage('Deploy and Run UI Tests') {
environment {
BROWSERSTACK = credentials('android-browserstack')
app_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 1p')
test_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 2p')
app_apk = sh(returnStdout: true, script: 'find app/build/outputs/apk/dhisUITesting -iname "*.apk"')
test_apk = sh(returnStdout: true, script: 'find app/build/outputs/apk/androidTest -iname "*.apk"')
app_apk_path = "${env.WORKSPACE}/${app_apk}"
test_apk_path = "${env.WORKSPACE}/${test_apk}"
buildTag = "${env.GIT_BRANCH}"
8 changes: 2 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Release notes - Android App for DHIS2 - 3.0.0.1
# Release notes - Android App for DHIS2 - 3.1.1.1

### Bug

[ANDROAPP-6194](https://dhis2.atlassian.net/browse/ANDROAPP-6194) Unable to search outside the program

[ANDROAPP-6195](https://dhis2.atlassian.net/browse/ANDROAPP-6195) Missing terms in transifex

[ANDROAPP-6210](https://dhis2.atlassian.net/browse/ANDROAPP-6210) UninitializedPropertyAccessException on breaking the glass
[ANDROAPP-6797](https://dhis2.atlassian.net/browse/ANDROAPP-6797) Update rule engine
Loading