Compare commits

...

2 commits

Author SHA1 Message Date
Vadim
cabc50d2aa Added workflow checks 2023-08-15 20:23:13 +02:00
Vadim
da95cb27cc typo 2023-08-15 19:45:11 +02:00
7 changed files with 48 additions and 15 deletions

View file

@ -16,18 +16,28 @@ on:
- dev
- prod
default: 'dev'
include-iap:
type: boolean
description: Include IAP package
default: false # TODO(@vodemn) when Google fixes their api
jobs:
build:
name: Build .apk
runs-on: macos-11
timeout-minutes: 15
steps:
- uses: webfactory/ssh-agent@v0.8.0
- name: Connect private iap package
uses: webfactory/ssh-agent@v0.8.0
if: ${{ inputs.include-iap }}
with:
ssh-private-key: ${{ secrets.M3_LIGHTMETER_IAP_KEY }}
- name: Override iap package with stub
if: ${{ !inputs.include-iap }}
run: |
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
- uses: actions/checkout@v3
with:
submodules: recursive

View file

@ -31,6 +31,10 @@ on:
type: boolean
description: Create Google Play release
default: true
include-iap:
type: boolean
description: Include IAP package
default: false # TODO(@vodemn) when Google fixes their api
env:
BUILD_ARGS: --release --flavor prod --dart-define cameraPreviewAspectRatio=240/320 -t lib/main_prod.dart
@ -38,14 +42,21 @@ env:
jobs:
build:
name: Build .apk & .aab
if: ${{ inputs.github-release }} || ${{ inputs.google-play-release }}
if: ${{ inputs.github-release || inputs.google-play-release }}
runs-on: macos-11
timeout-minutes: 30
steps:
- uses: webfactory/ssh-agent@v0.8.0
- name: Connect private iap package
uses: webfactory/ssh-agent@v0.8.0
if: ${{ inputs.include-iap }}
with:
ssh-private-key: ${{ secrets.M3_LIGHTMETER_IAP_KEY }}
- name: Override iap package with stub
if: ${{ !inputs.include-iap }}
run: |
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
- uses: actions/checkout@v3
with:
submodules: recursive

View file

@ -11,19 +11,26 @@ on:
pull_request:
branches: ["main"]
env:
# Stub iap package if this worlflow is running from the PR from a fork
STUB_IAP: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
jobs:
analyze_and_test:
name: Analyze & test
runs-on: macos-11
timeout-minutes: 10
steps:
- uses: shaunco/ssh-agent@git-repo-mapping
- name: Connect private iap package
uses: webfactory/ssh-agent@v0.8.0
if: !env.STUB_IAP
with:
ssh-private-key: |
${{ secrets.M3_LIGHTMETER_IAP_KEY }}
repo-mappings: |
github.com/vodemn/m3_lightmeter_iap
ssh-private-key: ${{ secrets.M3_LIGHTMETER_IAP_KEY }}
- name: Override iap package with stub
if: env.STUB_IAP
run: |
echo "\ndependecies_override:\n m3_lightmeter_iap:\n path: iap" >> pubspec.yaml
- uses: actions/checkout@v3
with:
@ -32,7 +39,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: '3.10.0'
flutter-version: "3.10.0"
- name: Prepare flutter project
run: |

View file

@ -135,7 +135,7 @@ class CameraContainer extends StatelessWidget {
}
double _cameraPreviewHeight(BuildContext context) {
return ((MediaQuery.of(context).size.width - Dimens.grid8 - 2 * Dimens.paddingM) / 2) /
return ((MediaQuery.sizeOf(context).width - Dimens.grid8 - 2 * Dimens.paddingM) / 2) /
PlatformConfig.cameraPreviewAspectRatio;
}
}

View file

@ -39,7 +39,7 @@ class ReadingsContainer extends StatelessWidget {
children: [
if (UserPreferencesProvider.meteringScreenFeatureOf(
context,
MeteringScreenLayoutFeature.extremeExposurePairs,
MeteringScreenLayoutFeature.equipmentProfiles,
)) ...[
const _EquipmentProfilePicker(),
const _InnerPadding(),

View file

@ -36,6 +36,7 @@ class _MeteringScreenLayoutFeaturesDialogState extends State<MeteringScreenLayou
_featureListTile(MeteringScreenLayoutFeature.equipmentProfiles),
_featureListTile(MeteringScreenLayoutFeature.extremeExposurePairs),
_featureListTile(MeteringScreenLayoutFeature.filmPicker),
_featureListTile(MeteringScreenLayoutFeature.histogram),
],
),
),

View file

@ -57,3 +57,7 @@ flutter:
flutter_intl:
enabled: true
dependecies_override:
m3_lightmeter_iap:
path: iap