Skip to content

Commit

Permalink
Merge pull request #191 from sparcs-kaist/dev
Browse files Browse the repository at this point in the history
v1.1.0 Release
  • Loading branch information
thomaskim1130 authored May 20, 2024
2 parents 7593eec + 2c1086b commit 3d290ef
Show file tree
Hide file tree
Showing 95 changed files with 3,757 additions and 1,683 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

## Description
<!--예:
divider가 사용된 글을 모바일앱에서 수정 버튼을 눌렀을 때 에러가 발생합니다.-->

## To Reproduce
<!--예:
divider가 사용된 글을 준비합니다. 모바일앱에서 수정 버튼을 클릭합니다. -->

## Expected behavior
<!--예:
글 수정 페이지가 로드되어야 합니다. -->

## Error Log
```
```

## Screenshots
<!-- 문제를 명확하게 보여주는 스크린샷 또는 영상을 추가해 주세요. -->

## Development Environment
- OS:
- Output of `flutter doctor`:

## Test Environment
- Device(OS):
- App Version or Comit Hash:

## Additional context
<!-- 문제와 관련된 추가적인 정보나 문맥을 제공해 주세요. -->
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature]"
labels: enhancement
assignees: ''

---

## Related Problem
<!-- 불편한 점이나 개선이 필요한 점에 대해 구체적으로 설명해주세요. 예: 모바일 앱에서 이미지 로딩 속도가 느립니다. -->

## Describe the Solution
<!-- 해결책에 대해 설명해주세요. 구체적인 기능 추가나 변경 사항을 제안해주세요. 예: 캐시 메커니즘을 도입하여 이미지 로딩 속도를 개선합니다. -->

## Describe Alternatives
<!-- 고려한 다른 해결 방법이나 대안에 대해 설명해주세요. 예: 이미지 해상도를 낮추어 로딩 속도를 개선합니다. -->

## Additional Context
<!-- 기능 요청에 대한 추가적인 맥락이나 스크린샷, 동영상을 제공해주세요. -->
35 changes: 35 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Overview
<!-- 간단하게 이 PR이 무엇인지 설명해주세요. 예: 새로운 로그인 기능 추가 -->

## Changes
<!-- 이 PR로 인해 변경되는 사항을 나열해주세요. 예:
- 로그인 페이지 UI 업데이트
- 로그인 API 연동
- 로그인 에러 처리 추가
-->

## Implementaion Method
<!-- 변경사항을 구현한 방법에 대해 특별히 전달해야할 것이 있다면 설명해주세요. 예:
- React Hook을 사용하여 상태 관리
- JWT를 사용한 인증 처리
-->

## After Changes
<!-- 변경 사항을 확인 할 수 있는 방법을 알려주세요. 가능하다면, 변화를 보여주는 스크린샷 또는 동영상을 첨부해주세요. 예:
- 로그인 성공 시 홈페이지로 리다이렉트하는 동영상
-->

## Related Issues
<!-- 관련 버그 현상이나 관련 이슈 번호가 있다면 링크를 적어주거나 스크린샷을 첨부해주세요. 예: #123 -->

## Rollback Scenario
<!-- 해당 PR를 롤백하는 방법과 순서를 알려주세요. 예:
1. revert commit
2. .env 파일 수정
-->

## TODO
<!-- 앞으로 해야하는 것이나, 논의가 필요한 부분 등을 적어주세요. 예:
- 로그인 관련 테스트 케이스 추가
- 다국어 지원 검토
-->
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [dev, main]
pull_request:
branches: [dev]
branches: [dev, main]

env:
FLUTTER_VERSION: "3.13"
Expand Down Expand Up @@ -34,6 +34,10 @@ jobs:
echo "keyAlias=ci" >> android/key.properties
- name: Install dependencies
run: flutter pub get
- name: Create .env files
run: |
echo "${{ secrets.ENV_PRODUCTION_FILE_CONTENT }}" > .env.production
echo "${{ secrets.ENV_DEVELOPMENT_FILE_CONTENT }}" > .env.development
- name: Build APK
run: flutter build apk --release --no-tree-shake-icons

Expand All @@ -57,5 +61,9 @@ jobs:
${{ runner.os }}-pods-
- name: Install dependencies
run: flutter pub get
- name: Create .env files
run: |
echo "${{ secrets.ENV_PRODUCTION_FILE_CONTENT }}" > .env.production
echo "${{ secrets.ENV_DEVELOPMENT_FILE_CONTENT }}" > .env.development
- name: Build iOS
run: flutter build ios --release --no-codesign --no-tree-shake-icons
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ ios/fastlane/README.md
ios/fastlane/.env.default
ios/Runner.app.dSYM.zip
ios/Runner.ipa

.env
.env.*
62 changes: 46 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 기여하기

## Release 절차(~ 2024.02.24 )
## How to release( ~ 2024.02.24 )

1. [Releases](https://github.com/sparcs-kaist/new-ara-app/releases)에 갑니다.
2. 이번 버전에서 변경된 사항을 Changes에 작성합니다.드래프트로 올립니다.
Expand All @@ -9,14 +8,16 @@
5. github release 페이지에서 드래프트를 풉니다.

~~버전을 하나 올린 후 `flutter build ios`를 반드시 실행해 주도록 합니다~~

ios FastFile에 `sh "flutter build ios --release --no-codesign --no-tree-shake-icons"` 추가해서 fastlane시 항상 자동으로 빌드하도록 수정했습니다.

## Release 절차( 2024.02.25 ~)
릴리즈 노트를 자동으로 작성하는 cd 코드를 main 브랜치에 추가했습니다.
## How to release( 2024.02.25 ~ )
릴리즈 노트를 자동으로 작성하는 cd 코드를 추가했습니다.
1. `pubspec.yaml`의 버전을 하나 올리는 커밋을 원격 저장소에 Pull Request하고 Merge 합니다.
2. fastlane으로 Android와 iOS에 deploy를 합니다.
2. 아래 **How to deploy** 항목을 보고 Android와 iOS에 deploy를 합니다.
3. [Releases](https://github.com/sparcs-kaist/new-ara-app/releases) 페이지에서 자동으로 등록된 릴리즈 노트의 내용을 수정합니다.

---
## How to deploy

### Fastlane 설정
Expand All @@ -41,14 +42,14 @@ bundle install
- `android/fastlane/newara-fastlane.json` : Google Play 서비스 계정 JSON 파일

- `android/fastlane/upload-keystore.jks` : Android App Signing Key for Upload Google Play

<br>
- `android/fastlane/.env` : 아래와 같이 각자 개인이 발급 받은 GITHUB_API_TOKEN을 추가합니다.

```env
GITHUB_API_TOKEN=****************************************
```
GITHUB_API_TOKEN 발급 받는 법: https://lifefun.tistory.com/161

[GITHUB_API_TOKEN 발급 받는 법](https://docs.github.com/ko/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) 상단 우측에 한국어 버젼 선택 가능
<br>

- `android/key.properties` : 아래와 같이 Signing Key 정보를 입력합니다.

Expand All @@ -68,38 +69,67 @@ FASTLANE_PASSWORD=********
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD=****-****-****-****
GITHUB_API_TOKEN=****************************************
```
[APPLE application specific password(앱 암호) 발급 받는 법](https://support.apple.com/ko-kr/102654)

<br>

- `ios/fastlane/Appfile` : 아래와 같이 Apple ID 계정 정보를 입력합니다.
- `ios/fastlane/Appfile` : 아래와 같이 Applefile이 되어있나 확인합니다.
```env
app_identifier("org.sparcs.new-ara-app") # The bundle identifier of your app
apple_id("****@****.***") # Your Apple Developer Portal username
apple_id(ENV["FASTLANE_USER"]) # It automatically references .env.deault file
itc_team_name("SPARCS") # App Store Connect Team Name
team_id("N5V8W52U3U") # Developer Portal Team ID
```


### 알파 버전 배포
### 알파 버전 배포 명령어

- Android: Google Play 스토어 `비공개 테스트 - Alpha` 트랙으로 업로드
- iOS: TestFlight로 업로드
- iOS: `TestFlight` 업로드

아래 명령어 시 `pubspec.yaml`에 있는 버젼 정보와 현재 시각으로 지정된 빌드 정보 기준으로 업로드 됩니다.

**앱에서 백엔드 대상이 prod가 맞는지 배포 전 꼭 확인 하세요!**
**앱에서 배포 서버는 production을 기본으로 합니다**

프로젝트 루트 디렉토리에서 아래 명령어 시 `pubspec.yaml`에 있는 버젼 정보와 현재 시각으로 지정된 빌드 정보 기준으로 업로드 됩니다.

```bash
cd android && bundle exec fastlane alpha && cd ../ios && bundle exec fastlane alpha
cd android && bundle exec fastlane alpha env:production && cd ../ios && bundle exec fastlane alpha env:production
```

<br>

아래 예시처럼 하나의 플랫폼에도 배포가 가능합니다.

```bash
cd ios && bundle exec fastlane alpha
cd ios && bundle exec fastlane alpha env:production
```

<br>

아래 예시처럼 dev 서버와 연결된 앱 배포도 가능합니다.

```bash
cd ios && bundle exec fastlane alpha env:development
```
<br>

아래 예시처럼 개별 fastlane 실행도 가능합니다. 아래는 깃허브 태그를 만드는 fastlane입니다.
```base
bundle exec fastlane create_release_note short_name:prod
```

### 배포 후 작업
- `pubspec.yaml` 변경 사항을 Discard 합니다.
- iOS Xcode 프로젝트 관련 파일들( `ios/Runner.xcodeproj/project.pbxproj`, `ios/Runner/Info.plist` )의 변경사항을 Discard 합니다.

## English translation
- 외부 패키지 사용했으니 자세한 내용은 [easy_localization](https://pub.dev/packages/easy_localization) 문서 읽어주시기 바랍니다.

- `assets/translations`에 번역 파일을 json 형식으로 저장하고 있습니다.
- json 수정할 때마다 프로젝트의 root 디렉토리에서 **아래 명령어** 실행 후 dart 파일 내에서 `LocaleKeys.****` 같은 클래스 형식으로 가능합니다.
```
dart run easy_localization:generate -S "assets/translations" -O "lib/translations" && dart run easy_localization:generate -S "assets/translations" -O "lib/translations" -f keys -o locale_keys.g.dart
```


86 changes: 84 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<p align=center>
<a href="https://newara.sparcs.org">
<img
src="https://raw.githubusercontent.com/sparcs-kaist/new-ara-web/master/src/assets/Services-Ara.png"
src="https://raw.githubusercontent.com/sparcs-kaist/new-ara-app/dev/assets/images/logo.svg"
alt="Ara Logo"
height="150"
height="100"
>
</a>
</p>
Expand All @@ -19,10 +19,92 @@
alt="Release version"
/>
</a>
</a>
<a href="#">
<img
src="https://img.shields.io/github/license/sparcs-kaist/new-ara-app"
alt="License"
/>
</a>
</p>

## How to Download
The SPARCS NewAra App is available for both Android and iOS. Follow the instructions below to download and install the app on your device.

### Android
1. Visit the Google Play Store on your Android device.
2. Search for "Ara for KAIST".
3. Tap "Install" to download and install the app.

[Play Store Link: Ara for KAIST](https://play.google.com/store/apps/details?id=org.sparcs.newara)

### iOS
1. Open the App Store on your iOS device.
2. Search for "Ara for KAIST".
3. Tap "Get" to download and install the app.

[App Store Link: Ara for KAIST](https://apps.apple.com/kr/app/ara-for-kaist/id6457209147)

## How to develop
### run

`FLUTTER_VERSION: "3.13"`, `JAVA_VERSION: "11"`


- `.env.development` : 프로젝트 루트 디렉토리에 `.env.development` 파일을 생성하고 아래와 같이 정보를 입력합니다.
```env
NEW_ARA_DEFAULT_URL=https://newara.dev.sparcs.org
NEW_ARA_AUTHORITY=newara.dev.sparcs.org
SPARCS_SSO_DEFAULT_URL=https://sparcssso.kaist.ac.kr
```
<br>

- `.env.production` : 프로젝트 루트 디렉토리에 `.env.production` 파일을 생성하고 아래와 같이 정보를 입력합니다.
```env
NEW_ARA_DEFAULT_URL=https://newara.sparcs.org
NEW_ARA_AUTHORITY=newara.sparcs.org
SPARCS_SSO_DEFAULT_URL=https://sparcssso.kaist.ac.kr
```

<br>

#### Terminal

- `development``production` 둘 중 하나를 선택해서 실행합니다.
- 지정하지 않을 시 `development`로 자동 실행됩니다.

ex) **`flutter run --dart-define=ENV=development`**

ex) **`flutter run --dart-define=ENV=production`**

#### VSCode

[VSCode에서 디버깅 방법](https://code.visualstudio.com/docs/editor/debugging)

- `launch.json``configurations`에 아래 내용을 추가하면 `development``production`을 전환하기 편합니다.
```
{
"version": "0.2.0",
"configurations": [
{
"name": "new-ara-app(Delevopment)",
"request": "launch",
"type": "dart",
"args": [
"--dart-define=ENV=development"
]
},
{
"name": "new-ara-app(Production)",
"request": "launch",
"type": "dart",
"args": [
"--dart-define=ENV=production"
],
},
]
}
```

## How to Deploy
- [CONTRIBUTING.md](https://github.com/sparcs-kaist/new-ara-app/blob/dev/CONTRIBUTING.md) 참조
3 changes: 3 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<resources>
<color name="window_background">#FFFFFF</color>
</resources>
Loading

0 comments on commit 3d290ef

Please sign in to comment.