Skip to content

Commit b45aec4

Browse files
committed
Initial commit
Import from legacy NCU-APP
0 parents  commit b45aec4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+36094
-0
lines changed

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
node: true,
6+
},
7+
extends: [
8+
'plugin:react/recommended',
9+
'airbnb',
10+
],
11+
parserOptions: {
12+
ecmaFeatures: {
13+
jsx: true,
14+
},
15+
ecmaVersion: 12,
16+
sourceType: 'module',
17+
},
18+
plugins: [
19+
'react',
20+
'react-native',
21+
],
22+
rules: {
23+
'react/jsx-props-no-spreading': 'off',
24+
'react/prop-types': 'off',
25+
'react-native/no-unused-styles': 2,
26+
},
27+
root: true,
28+
};

.expo-shared/assets.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
3+
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
4+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
35+
**Additional context**
36+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/build.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Build Standalone App
2+
3+
on:
4+
schedule:
5+
- cron: '0 4 * * MON'
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use Node.js 12
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm ci
17+
- name: Install Expo-CLI
18+
run: npm install -g expo-cli
19+
- name: Login Expo
20+
env:
21+
EXPO_CLI_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
22+
run: npx expo login --non-interactive -u NCUAppTeam
23+
- name: Publish build
24+
run: npx expo publish --non-interactive
25+
26+
build_android:
27+
runs-on: ubuntu-latest
28+
needs: publish
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Use Node.js 12
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: 12
35+
- name: Use Java 8
36+
uses: actions/setup-java@v1
37+
with:
38+
java-version: '8'
39+
- run: npm ci
40+
- name: Install Turtle-CLI
41+
run: npm install -g turtle-cli
42+
- name: Extract KeyStore
43+
env:
44+
BASE64_ENCODED: ${{ secrets.ANDROID_KEYSTORE }}
45+
run: echo "$BASE64_ENCODED" | base64 -d > ./KeyStore.jks
46+
- name: Build App
47+
env:
48+
EXPO_USERNAME: ncuappteam
49+
EXPO_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
50+
EXPO_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.EXPO_ANDROID_KEYSTORE_PASSWORD }}
51+
EXPO_ANDROID_KEY_PASSWORD: ${{ secrets.EXPO_ANDROID_KEY_PASSWORD }}
52+
run: turtle build:android --keystore-path ./KeyStore.jks --keystore-alias tw.edu.ncu.app --type apk -o NCU-App-$(date +'%Y-%m-%d').apk
53+
- name: Archive production artifacts
54+
uses: actions/upload-artifact@v2
55+
with:
56+
name: android-apk
57+
path: ./*.apk
58+
59+
build_ios:
60+
runs-on: macos-latest
61+
needs: publish
62+
steps:
63+
- uses: actions/checkout@v2
64+
- name: Use Node.js 12
65+
uses: actions/setup-node@v1
66+
with:
67+
node-version: 12
68+
- run: npm ci
69+
- name: Install Turtle-CLI
70+
run: npm install -g turtle-cli
71+
- name: Extract P12
72+
env:
73+
BASE64_ENCODED: ${{ secrets.APPLE_CERT_P12 }}
74+
run: echo "$BASE64_ENCODED" | base64 -d > ./cert.p12
75+
- name: Extract Provisioning profile
76+
env:
77+
BASE64_ENCODED: ${{ secrets.APPLE_PROFILE_MOBILEPROVISION }}
78+
run: echo "$BASE64_ENCODED" | base64 -d > ./profile.mobileprovision
79+
- name: Build App
80+
env:
81+
EXPO_USERNAME: ncuappteam
82+
EXPO_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
83+
EXPO_IOS_DIST_P12_PASSWORD: ${{ secrets.EXPO_IOS_DIST_P12_PASSWORD }}
84+
run: turtle build:ios --team-id 8AWNGKT5GW --dist-p12-path ./cert.p12 --provisioning-profile-path ./profile.mobileprovision -o NCU-App-$(date +'%Y-%m-%d').ipa
85+
- name: Archive production artifacts
86+
uses: actions/upload-artifact@v2
87+
with:
88+
name: ios-archive
89+
path: ./*.ipa

.github/workflows/lint_check.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Linting Check
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Use Node.js 12
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: 12
14+
- run: npm ci
15+
- name: RUN ESLint
16+
run: npx eslint . --ext .js,.jsx,.ts,.tsx

.github/workflows/publish.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Release App
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use Node.js 12
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm ci
17+
- name: Install Expo-CLI
18+
run: npm install -g expo-cli
19+
- name: Login Expo
20+
env:
21+
EXPO_CLI_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
22+
run: npx expo login --non-interactive -u NCUAppTeam
23+
- name: Publish build
24+
run: npx expo publish --non-interactive
25+
26+
release_android:
27+
runs-on: ubuntu-latest
28+
needs: publish
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Use Node.js 12
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: 12
35+
- name: Use Java 8
36+
uses: actions/setup-java@v1
37+
with:
38+
java-version: '8'
39+
- run: npm ci
40+
- name: Install Turtle-CLI
41+
run: npm install -g turtle-cli
42+
- name: Extract KeyStore
43+
env:
44+
BASE64_ENCODED: ${{ secrets.ANDROID_KEYSTORE }}
45+
run: echo "$BASE64_ENCODED" | base64 -d > ./KeyStore.jks
46+
- name: Build App
47+
env:
48+
EXPO_USERNAME: ncuappteam
49+
EXPO_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
50+
EXPO_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.EXPO_ANDROID_KEYSTORE_PASSWORD }}
51+
EXPO_ANDROID_KEY_PASSWORD: ${{ secrets.EXPO_ANDROID_KEY_PASSWORD }}
52+
run: turtle build:android --keystore-path ./KeyStore.jks --keystore-alias tw.edu.ncu.app --type app-bundle -o NCU-App-$(date +'%Y-%m-%d').aab
53+
# TODO, automatically upload .aab file to play store
54+
- name: Archive production artifacts
55+
uses: actions/upload-artifact@v2
56+
with:
57+
name: android-bundle
58+
path: ./*.aab
59+
60+
release_ios:
61+
runs-on: macos-latest
62+
needs: publish
63+
steps:
64+
- uses: actions/checkout@v2
65+
- name: Use Node.js 12
66+
uses: actions/setup-node@v1
67+
with:
68+
node-version: 12
69+
- run: npm ci
70+
- name: Install Turtle-CLI
71+
run: npm install -g turtle-cli
72+
- name: Extract P12
73+
env:
74+
BASE64_ENCODED: ${{ secrets.APPLE_CERT_P12 }}
75+
run: echo "$BASE64_ENCODED" | base64 -d > ./cert.p12
76+
- name: Extract Provisioning profile
77+
env:
78+
BASE64_ENCODED: ${{ secrets.APPLE_PROFILE_MOBILEPROVISION }}
79+
run: echo "$BASE64_ENCODED" | base64 -d > ./profile.mobileprovision
80+
- name: Build App
81+
env:
82+
EXPO_USERNAME: ncuappteam
83+
EXPO_PASSWORD: ${{ secrets.EXPO_CLI_PASSWORD }}
84+
EXPO_IOS_DIST_P12_PASSWORD: ${{ secrets.EXPO_IOS_DIST_P12_PASSWORD }}
85+
run: turtle build:ios --team-id 8AWNGKT5GW --dist-p12-path ./cert.p12 --provisioning-profile-path ./profile.mobileprovision -o NCU-App.ipa
86+
- name: Validate App
87+
run: xcrun altool --validate-app -f NCU-App.ipa -t ios -u [email protected] -p ${{ secrets.APPLE_PASSWORD }}
88+
- name: Upload App
89+
run: xcrun altool --upload-app -f NCU-App.ipa -t ios -u [email protected] -p ${{ secrets.APPLE_PASSWORD }}

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
node_modules/**/*
2+
.expo/*
3+
npm-debug.*
4+
*.jks
5+
*.p8
6+
*.p12
7+
*.key
8+
*.mobileprovision
9+
*.orig.*
10+
web-build/
11+
12+
# macOS
13+
.DS_Store

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Attach to packager",
9+
"request": "attach",
10+
"type": "reactnative",
11+
"cwd": "${workspaceFolder}",
12+
"port": 19000
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)