Skip to content

Commit

Permalink
Merge branch 'main' into 2731-linting-rule-arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
simomps authored Nov 6, 2024
2 parents cf8c5ad + 4f30961 commit 9e8848b
Show file tree
Hide file tree
Showing 34 changed files with 303 additions and 53 deletions.
12 changes: 11 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@ jobs:
paths:
- << parameters.build_config_name >>.apk
root: native/android
- run:
command: mv app/build/outputs/bundle/release/app-release.aab << parameters.build_config_name >>.aab
name: Rename aab
working_directory: native/android
- store_artifacts:
path: native/android/<< parameters.build_config_name >>.aab
- persist_to_workspace:
paths:
- << parameters.build_config_name >>.aab
root: native/android
- unless:
condition:
or:
Expand Down Expand Up @@ -569,7 +579,7 @@ jobs:
name: '[FL] Browserstack Upload Live'
working_directory: native
- run:
command: bundle exec fastlane android playstore_upload build_config_name:<< parameters.build_config_name >> apk_path:attached_workspace/<< parameters.build_config_name >>.apk production_delivery:"<< parameters.production_delivery >>" version_name:${NEW_VERSION_NAME} version_code:${NEW_VERSION_CODE}
command: bundle exec fastlane android playstore_upload build_config_name:<< parameters.build_config_name >> aab_path:attached_workspace/<< parameters.build_config_name >>.aab production_delivery:"<< parameters.production_delivery >>" version_name:${NEW_VERSION_NAME} version_code:${NEW_VERSION_CODE}
name: '[FL] Play Store Upload'
working_directory: native
- notify
Expand Down
10 changes: 10 additions & 0 deletions .circleci/src/jobs/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ steps:
root: native/android
paths:
- << parameters.build_config_name >>.apk
- run:
name: Rename aab
command: mv app/build/outputs/bundle/release/app-release.aab << parameters.build_config_name >>.aab
working_directory: native/android
- store_artifacts:
path: native/android/<< parameters.build_config_name >>.aab
- persist_to_workspace:
root: native/android
paths:
- << parameters.build_config_name >>.aab
- unless:
condition:
or:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/deliver_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ steps:
working_directory: native
- run:
name: '[FL] Play Store Upload'
command: bundle exec fastlane android playstore_upload build_config_name:<< parameters.build_config_name >> apk_path:attached_workspace/<< parameters.build_config_name >>.apk production_delivery:"<< parameters.production_delivery >>" version_name:${NEW_VERSION_NAME} version_code:${NEW_VERSION_CODE}
command: bundle exec fastlane android playstore_upload build_config_name:<< parameters.build_config_name >> aab_path:attached_workspace/<< parameters.build_config_name >>.aab production_delivery:"<< parameters.production_delivery >>" version_name:${NEW_VERSION_NAME} version_code:${NEW_VERSION_CODE}
working_directory: native
- notify
4 changes: 4 additions & 0 deletions assets/icons/chat-bot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/chat-person.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions build-configs/aschaffenburg/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { ColorsType, commonLightColors } from '../../common/theme/colors'

const themeColor = '#009684'
const themeColorLight = 'rgba(0, 150, 132, 0.5)'
const themeContrast = '#1A1A1A'

export const lightColors: ColorsType = {
themeColor,
themeColorLight,
themeContrast,
...commonLightColors,
}
1 change: 1 addition & 0 deletions build-configs/common/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type ColorsType = {
negativeHighlight: string
invalidInput: string
linkColor: string
themeContrast: string
}
export const commonLightColors = {
backgroundAccentColor: '#fafafa',
Expand Down
2 changes: 2 additions & 0 deletions build-configs/integreat/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { ColorsType, commonLightColors } from '../../common/theme/colors'

const themeColor = '#fbda16'
const themeColorLight = 'rgba(251, 218, 22, 0.5)'
const themeContrast = '#000000'

export const lightColors: ColorsType = {
themeColor,
themeColorLight,
themeContrast,
...commonLightColors,
}
2 changes: 2 additions & 0 deletions build-configs/malte/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { ColorsType, commonLightColors } from '../../common/theme/colors'

const themeColor = '#ff0000'
const themeColorLight = 'rgba(255, 0, 0, 0.5)'
const themeContrast = '#fff'

export const lightColors: ColorsType = {
themeColor,
themeColorLight,
themeContrast,
...commonLightColors,
}
2 changes: 2 additions & 0 deletions build-configs/obdach/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { ColorsType, commonLightColors } from '../../common/theme/colors'

const themeColor = '#E55129'
const themeColorLight = 'rgba(229, 81, 41, 0.5)'
const themeContrast = '#000000'

export const lightColors: ColorsType = {
themeColor,
themeColorLight,
themeContrast,
...commonLightColors,
}
2 changes: 1 addition & 1 deletion e2e-tests/shared/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const filter = 'wirschaffendas'
export const contentSearch = 'language'
export const defaultCity = 'Testumgebung Ende-zu-Ende-Testing'
export const defaultCity = 'E2E-Testumgebung'
export const augsburgCity = 'Stadt Augsburg'
export const language = 'en'

Expand Down
2 changes: 1 addition & 1 deletion native/android/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ lane :build do |options|
end

gradle(
task: "assembleRelease",
tasks: ["assembleRelease", "bundleRelease"],
properties: {
:BUILD_CONFIG_NAME => build_config_name,
:VERSION_CODE => version_code,
Expand Down
27 changes: 20 additions & 7 deletions native/docs/manual-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,37 @@ found [here](build-configs.md).**
- Install and setup XCode.
- [Install and setup Fastlane](../../docs/cicd.md#fastlane-setup).
- Read about [Apple Certificates](apple-certifcates.md).
- To set up the certificates:
- have access to the `app-credentials` repo
- have access to the Passbolt folder "Integreat App Publishing"
- your personal Apple account needs to be added to the Digitalfabrik's account either as an admin or with the right to
access "Certificates, Identifiers & Profiles".

#### Certificates Setup
If you need any of these permissions, ask for them in the ~team-app channel on Mattermost.

- Prepare the necessary environment variables as
specified [here](../../docs/cicd.md#environment-variables-and-dependencies).
#### Certificates Setup

- Install the certificates locally:

```bash
cd ios && bundle exec fastlane certificates
cd ios && fastlane match development
```

If you want to build for for a different environment than development (e.g. production), put that one in the command.

- If you get an error that you can't clone the repo `app-credentials`, request access.

- The password that you need to fill in twice is saved in Passbolt as Digitalfabrik Fastlane Match.

- The Apple account that you need to sign in to is your personal one.

- You will need to add all the `app_identifiers` you want to work with. You can find a list of them at
https://github.com/digitalfabrik/app-credentials/blob/main/apple%20app%20identifier%20list.txt

##### Trouble Shooting

- [Installing certificates hangs on `Cloning remote git repo...`](troubleshooting.md#bundle-exec-fastlane-certificates-hangs-on-cloning-remote-git-repo)
- Secrets containing `'`: Exporting as environment variable is possible as
follows: `export SECRET='<prefix>'"'"'<suffix>'`.
- 2FA prompt: Message @Max or @Steffen.
- Secrets containing `'`: Exporting as environment variable is possible as follows: `export SECRET='<prefix>'"'"'<suffix>'`.

#### Dependency Management

Expand Down
11 changes: 6 additions & 5 deletions native/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ platform :android do
# version_code: The version code of the app
# version_name: The version name of the app
# build_config_name: The name of the build config
# apk_path: The path of the apk to upload (relative to home dir)
# production_delivery: Whether the apk should be uploaded to the production track
# aab_path: The path of the aab to upload (relative to home dir)
# production_delivery: Whether the aab should be uploaded to the production track
desc "Deliver the app to Play Store. Depending on the option `production_delivery` the update is released to the general public."
lane :playstore_upload do |options|
ensure_env_vars(
Expand All @@ -77,10 +77,10 @@ platform :android do
version_code = options[:version_code]
version_name = options[:version_name]
build_config_name = options[:build_config_name]
apk_path = options[:apk_path]
aab_path = options[:aab_path]
production_delivery = options[:production_delivery]

if [version_name, version_code, build_config_name, apk_path, production_delivery].include?(nil)
if [version_name, version_code, build_config_name, aab_path, production_delivery].include?(nil)
raise "'nil' passed as parameter! Aborting..."
end

Expand All @@ -102,7 +102,7 @@ platform :android do
skip_upload_screenshots: skip_images,
skip_upload_metadata: false,
release_status: "completed",
apk: "#{ENV['HOME']}/#{apk_path}",
aab: "#{ENV['HOME']}/#{aab_path}",
json_key_data: ENV["GOOGLE_SERVICE_ACCOUNT_JSON"]
)
end
Expand Down Expand Up @@ -153,6 +153,7 @@ platform :android do
skip_upload_screenshots: true,
skip_upload_metadata: true,
skip_upload_apk: true,
skip_upload_aab: true,
release_status: "completed",
json_key_data: ENV["GOOGLE_SERVICE_ACCOUNT_JSON"]
)
Expand Down
31 changes: 14 additions & 17 deletions native/ios/fastlane/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,38 @@
# fastlane documentation
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```
```sh
xcode-select --install
```

Install _fastlane_ using

```
[sudo] gem install fastlane -NV
```

or alternatively using `brew install fastlane`
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

### certificates

```
fastlane certificates
```sh
[bundle exec] fastlane certificates
```

Download and setup certificates

### build

```
fastlane build
```sh
[bundle exec] fastlane build
```

Create a release build

---
----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

This README.md is auto-generated and will be re-generated every time [fastlane](https://fastlane.tools) is run.
More information about fastlane can be found on [fastlane.tools](https://fastlane.tools).
The documentation of fastlane can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
14 changes: 10 additions & 4 deletions native/src/hooks/useLoadCityContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import {
LocalNewsModel,
PoiModel,
ReturnType,
createCitiesEndpoint,
} from 'shared/api'

import dataContainer from '../utils/DefaultDataContainer'
import loadResourceCache from '../utils/loadResourceCache'
import { reportError } from '../utils/sentry'
import useLoadCities from './useLoadCities'
import useLoadWithCache from './useLoadWithCache'
import usePreviousProp from './usePreviousProp'
import useSnackbar from './useSnackbar'
Expand Down Expand Up @@ -51,10 +51,16 @@ export type CityContentReturn = Omit<Omit<ReturnType<CityContentData>, 'error'>,
*/
const useLoadCityContent = ({ cityCode, languageCode, refreshLocalNews }: Params): CityContentReturn => {
const showSnackbar = useSnackbar()
const citiesReturn = useLoadCities()
const previousLanguageCode = usePreviousProp({ prop: languageCode })
const params = { cityCode, languageCode, showSnackbar }

const citiesReturn = useLoadWithCache({
...params,
isAvailable: dataContainer.citiesAvailable,
createEndpoint: createCitiesEndpoint,
getFromDataContainer: dataContainer.getCities,
setToDataContainer: (_, __, cities) => dataContainer.setCities(cities),
})
const categoriesReturn = useLoadWithCache({
...params,
isAvailable: dataContainer.categoriesAvailable,
Expand Down Expand Up @@ -86,7 +92,7 @@ const useLoadCityContent = ({ cityCode, languageCode, refreshLocalNews }: Params
})

useEffect(() => {
if (categoriesReturn.data && eventsReturn.data && poisReturn.data) {
if (citiesReturn.data && categoriesReturn.data && eventsReturn.data && poisReturn.data && localNewsReturn.data) {
// Load the resource cache in the background once a day and do not wait for it
dataContainer.getLastUpdate(cityCode, languageCode).then(lastUpdate => {
if (!lastUpdate || lastUpdate < DateTime.utc().startOf('day')) {
Expand All @@ -104,7 +110,7 @@ const useLoadCityContent = ({ cityCode, languageCode, refreshLocalNews }: Params
// WARNING: This also means that the last update is updated if everything is just loaded from the cache.
dataContainer.setLastUpdate(cityCode, languageCode, DateTime.utc()).catch(reportError)
}
}, [categoriesReturn, eventsReturn, poisReturn, cityCode, languageCode])
}, [citiesReturn, categoriesReturn, eventsReturn, poisReturn, localNewsReturn, cityCode, languageCode])

const city = citiesReturn.data?.find(it => it.code === cityCode)
const language = city?.languages.find(it => it.code === languageCode)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
issue_key: 2805
show_in_stores: false
platforms: # relevant platforms, possible values: web, android and ios
- web
en: Display banner to route android users to the mobile app.
6 changes: 6 additions & 0 deletions release-notes/2024.10.3/2897-refresh-cities.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
issue_key: 2897
show_in_stores: false
platforms:
- ios
- android
en: Cities and enabled features are now updated daily.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('createChatMessagesEndpoint', () => {
id: 2,
body: 'Informationen zu Ihrer Frage finden Sie auf folgenden Seiten:',
user_is_author: false,
automatic_answer: false,
},
],
}
Expand All @@ -32,6 +33,7 @@ describe('createChatMessagesEndpoint', () => {
id: 2,
body: 'Informationen zu Ihrer Frage finden Sie auf folgenden Seiten:',
userIsAuthor: false,
automaticAnswer: false,
}),
])
})
Expand Down
Loading

0 comments on commit 9e8848b

Please sign in to comment.