Skip to content

Commit

Permalink
Merge pull request #1736 from coopcycle/feature/1707-auto-accept
Browse files Browse the repository at this point in the history
app: Allow for auto-accepting of orders for specific restaurants
  • Loading branch information
vladimir-8 authored Jul 2, 2024
2 parents f406812 + 0b9e930 commit 0435756
Show file tree
Hide file tree
Showing 40 changed files with 1,915 additions and 1,004 deletions.
1 change: 1 addition & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ GOOGLE_SIGN_IN_CLIENT_ID=
DEFAULT_SERVER=
PRIMARY_COLOR=
SMARTLOOK_PROJECT_KEY=
DEBUG_REDUX_LOGGER_LEVEL=log
40 changes: 31 additions & 9 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
name: Build Android
run-name: >
${{ inputs.deploy_google_play && format('Release to {0} track', inputs.google_play_track) || 'Build' }}
${{ inputs.tag }}
${{ inputs.build_official && '; CoopCycle' || '' }}
${{ inputs.build_official_beta && '; CoopCycle (Beta)' || '' }}
${{ inputs.build_naofood && '; Naofood' || '' }}
${{ inputs.build_kooglof && '; Kooglof' || '' }}
${{ inputs.build_robinfood && '; RobinFood' || '' }}
${{ inputs.build_coursiers_rennais && '; Les Coursiers Rennais' || '' }}
${{ inputs.build_eraman && '; Eraman' || '' }}
on:
workflow_dispatch:
inputs:
tag:
type: string
description: Build a specific git tag
required: true
deploy_google_play:
description: 'Deploy to Google Play'
description: 'Upload to Google Play'
required: true
type: boolean
default: true
default: false
google_play_track:
description: 'Google Play track'
required: true
type: string
default: 'production'
default: 'internal'
build_official:
description: 'Build official app'
description: 'Build CoopCycle production app'
required: true
type: boolean
build_official_beta:
description: 'Build official beta app'
description: 'Build CoopCycle beta app'
required: true
type: boolean
build_naofood:
Expand All @@ -41,19 +55,21 @@ on:
required: true
type: boolean
jobs:
default:
coopcycle:
if: ${{ inputs.build_official }}
name: Build default app
name: Build CoopCycle production app
uses: ./.github/workflows/fastlane_android.yml
secrets: inherit
with:
tag: ${{ inputs.tag }}
google_play_track: ${{ inputs.google_play_track }}
deploy_google_play: ${{ inputs.deploy_google_play }}
default_beta:
coopcycle_beta:
if: ${{ inputs.build_official_beta }}
name: Build default beta app
name: Build CoopCycle beta app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: beta
app_name: CoopCycle (Beta)
package_name: fr.coopcycle.beta
Expand All @@ -67,6 +83,7 @@ jobs:
name: Build Naofood app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: naofood
instance_url: https://naofood.coopcycle.org
app_name: Naofood
Expand All @@ -82,6 +99,7 @@ jobs:
name: Build Zampate app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: zampate
instance_url: https://zampate.coopcycle.org
app_name: Zampate
Expand All @@ -97,6 +115,7 @@ jobs:
name: Build Kooglof app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: kooglof
instance_url: https://kooglof.coopcycle.org
app_name: Kooglof
Expand All @@ -112,6 +131,7 @@ jobs:
name: Build RobinFood app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: robinfood
instance_url: https://robinfood.coopcycle.org
app_name: Robin Food
Expand All @@ -127,6 +147,7 @@ jobs:
name: Build Coursiers MTP app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: coursiersmontpellier
instance_url: https://coursiersmontpellier.coopcycle.org
app_name: Coursiers MTP
Expand All @@ -142,6 +163,7 @@ jobs:
name: Build LCR app
uses: ./.github/workflows/fastlane_android.yml
with:
tag: ${{ inputs.tag }}
instance: lcr
instance_url: https://lcr.coopcycle.org
app_name: Les Coursiers Rennais
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
name: Build iOS
run-name: >
Upload to App Store ${{ inputs.tag }}
${{ inputs.build_official && '; CoopCycle' || '' }}
${{ inputs.build_official_beta && '; CoopCycle (Beta)' || '' }}
${{ inputs.build_naofood && '; Naofood' || '' }}
${{ inputs.build_kooglof && '; Kooglof' || '' }}
${{ inputs.build_robinfood && '; RobinFood' || '' }}
on:
workflow_dispatch:
inputs:
tag:
type: string
description: Build a specific git tag
required: true
build_official:
description: 'Build official app'
description: 'Build CoopCycle production app'
required: true
type: boolean
build_official_beta:
description: 'Build CoopCycle beta app (TODO: finish setup)'
required: true
type: boolean
build_naofood:
Expand All @@ -23,18 +38,31 @@ on:
required: true
type: boolean
jobs:
default:
coopcycle:
if: ${{ inputs.build_official }}
name: Build default app
name: Build CoopCycle production app
uses: ./.github/workflows/fastlane_ios.yml
with:
tag: ${{ inputs.tag }}
google_service_info_plist_base64: GOOGLE_SERVICE_INFO_PLIST_BASE64
secrets: inherit
coopcycle_beta:
if: ${{ inputs.build_official_beta }}
name: Build CoopCycle beta app
uses: ./.github/workflows/fastlane_ios.yml
with:
tag: ${{ inputs.tag }}
instance: beta
app_name: CoopCycle (Beta)
app_id: org.coopcycle.CoopCycleBeta
google_service_info_plist_base64: GOOGLE_SERVICE_INFO_PLIST_BASE64_BETA
secrets: inherit
naofood:
if: ${{ inputs.build_naofood }}
name: Build Naofood app
uses: ./.github/workflows/fastlane_ios.yml
with:
tag: ${{ inputs.tag }}
instance: naofood
instance_url: https://naofood.coopcycle.org
app_name: Naofood
Expand All @@ -47,6 +75,7 @@ jobs:
name: Build Kooglof app
uses: ./.github/workflows/fastlane_ios.yml
with:
tag: ${{ inputs.tag }}
instance: kooglof
instance_url: https://kooglof.coopcycle.org
app_name: Kooglof
Expand All @@ -59,6 +88,7 @@ jobs:
name: Build RobinFood app
uses: ./.github/workflows/fastlane_ios.yml
with:
tag: ${{ inputs.tag }}
instance: robinfood
instance_url: https://robinfood.coopcycle.org
app_name: Robin Food
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/fastlane_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Fastlane Android
on:
workflow_call:
inputs:
tag:
type: string
description: Build a specific git tag
required: true
instance:
type: string
required: false
Expand Down Expand Up @@ -32,11 +36,7 @@ on:
google_play_track:
type: string
required: false
default: "production"
branch:
type: string
required: false
default: "master"
default: "internal"
deploy_google_play:
type: boolean
required: false
Expand All @@ -48,7 +48,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
ref: ${{ inputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
ref: ${{ inputs.tag }}
- name: Download apk artifact
uses: actions/download-artifact@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/fastlane_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Fastlane iOS
on:
workflow_call:
inputs:
tag:
type: string
description: Build a specific git tag
required: true
instance:
type: string
required: false
Expand Down Expand Up @@ -29,6 +33,8 @@ jobs:
runs-on: macOS-14
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- uses: actions/setup-node@v4
with:
node-version: '20.x'
Expand Down
Binary file added ios/fastlane/metadata-beta/app_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"react-navigation-header-buttons": "^11.2.1",
"react-query": "^3.39.3",
"react-redux": "^7.2.8",
"recursive-diff": "^1.0.9",
"reduce-reducers": "^1.0.4",
"redux": "^4.2.1",
"redux-actions": "^2.6.5",
Expand Down
Loading

0 comments on commit 0435756

Please sign in to comment.