Skip to content

Commit

Permalink
feat: 馃幐 Updated deps and removed unnecessary parsing in week
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanObrink committed Apr 27, 2021
2 parents a2846cd + 8b2f2cc commit 586a975
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 46 deletions.
182 changes: 182 additions & 0 deletions bitrise.yml
@@ -0,0 +1,182 @@
---
format_version: '8'
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git'
project_type: react-native
trigger_map:
- push_branch: main
workflow: primary
- pull_request_source_branch: '*'
workflow: primary
workflows:
deploy:
description: >
## Configure Android part of the deploy workflow
To generate a signed APK:
1. Open the **Workflow** tab of your project on Bitrise.io
1. Add **Sign APK step right after Android Build step**
1. Click on **Code Signing** tab
1. Find the **ANDROID KEYSTORE FILE** section
1. Click or drop your file on the upload file field
1. Fill the displayed 3 input fields:
1. **Keystore password**
1. **Keystore alias**
1. **Private key password**
1. Click on **[Save metadata]** button
That's it! From now on, **Sign APK** step will receive your uploaded
files.
## Configure iOS part of the deploy workflow
To generate IPA:
1. Open the **Workflow** tab of your project on Bitrise.io
1. Click on **Code Signing** tab
1. Find the **PROVISIONING PROFILE** section
1. Click or drop your file on the upload file field
1. Find the **CODE SIGNING IDENTITY** section
1. Click or drop your file on the upload file field
1. Click on **Workflows** tab
1. Select deploy workflow
1. Select **Xcode Archive & Export for iOS** step
1. Open **Force Build Settings** input group
1. Specify codesign settings
Set **Force code signing with Development Team**, **Force code signing
with Code Signing Identity**
and **Force code signing with Provisioning Profile** inputs regarding to
the uploaded codesigning files
1. Specify manual codesign style
If the codesigning files, are generated manually on the Apple Developer
Portal,
you need to explicitly specify to use manual coedsign settings
(as ejected rn projects have xcode managed codesigning turned on).
To do so, add 'CODE_SIGN_STYLE="Manual"' to 'Additional options for
xcodebuild call' input
## To run this workflow
If you want to run this workflow manually:
1. Open the app's build list page
2. Click on **[Start/Schedule a Build]** button
3. Select **deploy** in **Workflow** dropdown input
4. Click **[Start Build]** button
Or if you need this workflow to be started by a GIT event:
1. Click on **Triggers** tab
2. Setup your desired event (push/tag/pull) and select **deploy** workflow
3. Click on **[Done]** and then **[Save]** buttons
The next change in your repository that matches any of your trigger map
event will start **deploy** workflow.
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
- script@1:
title: Do anything with Script step
- yarn@0:
inputs:
- workdir: packages/app
- command: install
- install-missing-android-tools@2:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- android-build@0:
inputs:
- project_location: $PROJECT_LOCATION
- certificate-and-profile-installer@1: {}
- recreate-user-schemes@1:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- cocoapods-install@2: {}
- xcode-archive@3:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- scheme: $BITRISE_SCHEME
- export_method: $BITRISE_EXPORT_METHOD
- configuration: Release
- deploy-to-bitrise-io@1: {}
primary:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
- script@1:
title: Do anything with Script step
- yarn@0:
inputs:
- workdir: packages/app
- command: install
- yarn@0:
inputs:
- workdir: packages/app
- command: test
- deploy-to-bitrise-io@1: {}
description: Build and deploy
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: packages/app/android
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
VARIANT: debug
- opts:
is_expand: false
BITRISE_PROJECT_PATH: packages/app/ios/app.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: app
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: ad-hoc
1 change: 1 addition & 0 deletions packages/app/android/app/build.gradle
Expand Up @@ -213,6 +213,7 @@ dependencies {
} else {
implementation jscFlavor
}

}

// Run this once to be able to run the application with BUCK
Expand Down
8 changes: 8 additions & 0 deletions packages/app/android/build.gradle
Expand Up @@ -36,3 +36,11 @@ allprojects {
maven { url 'https://www.jitpack.io' }
}
}

subprojects {
configurations.all {
resolutionStrategy {
force 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
}
}
}
1 change: 1 addition & 0 deletions packages/app/android/gradle.deps
@@ -0,0 +1 @@
02dd6e8cd1138dfaefd4e955be6e632bb9d61118ebc852e464cbf7f913017022a61be5c76153ce2218ccbd83e3f9aec2
17 changes: 11 additions & 6 deletions packages/app/components/week.component.tsx
Expand Up @@ -10,8 +10,8 @@ import React from 'react'
import moment from 'moment'
import { StyleSheet, View } from 'react-native'
import { useMenu, useTimetable } from '@skolplattformen/api-hooks'
import parse from '@skolplattformen/curriculum'
import { TimetableEntry, Child } from '@skolplattformen/embedded-api'
import { LanguageService } from '../services/languageService'

const days = ['m氓ndag', 'tisdag', 'onsdag', 'torsdag', 'fredag']

Expand Down Expand Up @@ -39,11 +39,11 @@ const LessonList = ({ lessons, header }: LessonListProps) => (
{header}
</Text>
)}
renderItem={({ item: { id, code, timeStart, timeEnd, teacher, room } }) => (
renderItem={({ item: { id, name, timeStart, timeEnd, teacher, room } }) => (
<ListItem
key={id}
style={styles.item}
title={`${parse(code).name || code}`}
title={name}
description={`${timeStart.slice(0, 5)}-${timeEnd.slice(0, 5)} ${
room ? `(${room})` : ''
} ${teacher}`}
Expand Down Expand Up @@ -93,11 +93,16 @@ export const Week = ({ child }: WeekProps) => {
let date = moment() // skip today after school, pick tomorrow
//if (date.isoWeekday() > 5) date = date.add(3, 'days').startOf('week') // skip weekends, pick monday next week instead
const [selectedIndex, setSelectedIndex] = React.useState(
Math.min(date.weekday(), 5)
Math.min(date.isoWeekday() - 1, 5)
)
const [year, week] = [moment().isoWeekYear(), moment().isoWeek()]
console.log('year week', year, week, date.toString())
const { data: lessons } = useTimetable(child, week, year)
console.log('Language', LanguageService.getLanguageCode())
const { data: lessons } = useTimetable(
child,
week,
year,
LanguageService.getLanguageCode()
)
const { data: menu } = useMenu(child)

return (
Expand Down
6 changes: 3 additions & 3 deletions packages/app/ios/Podfile.lock
Expand Up @@ -279,7 +279,7 @@ PODS:
- react-native-simple-toast (1.1.3):
- React-Core
- Toast (~> 4.0.0)
- react-native-webview (11.3.2):
- react-native-webview (11.4.2):
- React-Core
- React-perflogger (0.64.0)
- React-RCTActionSheet (0.64.0):
Expand Down Expand Up @@ -542,7 +542,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
FBReactNativeSpec: 5f526e6823c165fed82ca17947fd172ce470a01a
FBReactNativeSpec: 0b41cf9e0b74ffa97ededb3d0210da5b4710474c
Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: f7a3caafbd74bda4827954fd7a6e000e36355489
Expand Down Expand Up @@ -570,7 +570,7 @@ SPEC CHECKSUMS:
react-native-restart: 733a51ad137f15b0f8dc34c4082e55af7da00979
react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79
react-native-simple-toast: bf002828cf816775a6809f7a9ec3907509bce11f
react-native-webview: 71567b6bf3d4e55914e580d720cc8f7df64af817
react-native-webview: 4c85a3e5de574ee8c2c0985b4bebbdd240f49304
React-perflogger: 9c547d8f06b9bf00cb447f2b75e8d7f19b7e02af
React-RCTActionSheet: 3080b6e12e0e1a5b313c8c0050699b5c794a1b11
React-RCTAnimation: 3f96f21a497ae7dabf4d2f150ee43f906aaf516f
Expand Down
11 changes: 9 additions & 2 deletions packages/app/ios/app.xcodeproj/project.pbxproj
Expand Up @@ -295,8 +295,9 @@
TestTargetID = 13B07F861A680F5B00A75B9A;
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 8PZ3BD667F;
DevelopmentTeam = 59292HY5Q8;
LastSwiftMigration = 1120;
ProvisioningStyle = Manual;
};
2D02E47A1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
Expand Down Expand Up @@ -701,8 +702,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 156;
DEVELOPMENT_TEAM = 8PZ3BD667F;
DEVELOPMENT_TEAM = 59292HY5Q8;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = app/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -714,6 +717,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = se.kolplattformen.app;
PRODUCT_NAME = app;
PROVISIONING_PROFILE_SPECIFIER = "脰ppna Skolplattformen Provisioning Profile";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -727,6 +731,8 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 156;
DEVELOPMENT_TEAM = 59292HY5Q8;
INFOPLIST_FILE = app/Info.plist;
Expand All @@ -739,6 +745,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = se.kolplattformen.app;
PRODUCT_NAME = app;
PROVISIONING_PROFILE_SPECIFIER = "脰ppna Skolplattformen Provisioning Profile";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
Expand Down
11 changes: 6 additions & 5 deletions packages/app/package.json
Expand Up @@ -8,7 +8,7 @@
"pod": "npx pod-install",
"start": "react-native start",
"test": "is-ci-cli test:ci test:watch",
"test:ci": "jest",
"test:ci": "TZ=Europe/Stockholm jest",
"test:watch": "jest --watch",
"typecheck": "tsc --watch",
"i18n": "sync-i18n --files '**/translations/*.json' --primary en --languages ar de pl so sv --space 2",
Expand All @@ -25,8 +25,9 @@
"@react-navigation/bottom-tabs": "5.11.9",
"@react-navigation/native": "5.9.4",
"@react-navigation/stack": "5.14.4",
"@skolplattformen/api-hooks": "2.1.1",
"@skolplattformen/embedded-api": "4.4.1",
"@skolplattformen/api-hooks": "3.0.0",
"@skolplattformen/curriculum": "1.3.1",
"@skolplattformen/embedded-api": "5.1.0",
"@ui-kitten/components": "5.0.0",
"@ui-kitten/eva-icons": "5.0.0",
"buffer": "6.0.3",
Expand All @@ -53,8 +54,8 @@
"react-native-svg-transformer": "0.14.3",
"react-native-tab-view": "2.15.2",
"react-native-typography": "1.4.1",
"react-native-webview": "11.3.2",
"rn-actionsheet-module": "1.0.3",
"react-native-webview": "11.4.2",
"rn-actionsheet-module": "https://github.com/viktorlarsson/rn-actionsheet-module",
"use-async-storage": "1.2.0",
"yup": "0.32.9"
},
Expand Down

0 comments on commit 586a975

Please sign in to comment.