Skip to content

Commit

Permalink
Tidy README and add comments to pre-commit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
maxisme committed Apr 2, 2021
1 parent 8a9c53e commit 072d22a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
54 changes: 34 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,60 @@
# [notifi.it](https://notifi.it/)

## App | [Website](https://github.com/maxisme/notifi.it) | [Backend](https://github.com/maxisme/notifi-backend)

[![style: lint](https://img.shields.io/badge/lint-flutter-4BC0F5)](https://pub.dev/packages/lint)
[![MacOS](https://github.com/maxisme/notifi/actions/workflows/push.yml/badge.svg?branch=master)](https://github.com/maxisme/notifi/actions/workflows/push.yml)
# install
```

# Install Flutter

https://flutter.dev/docs/get-started/install

## MacOS build & run

```bash
flutter channel master
flutter upgrade
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
flutter doctor
```
## mac
```
flutter build macos
flutter run -d macos
```

## [install flutter](https://flutter.dev/docs/get-started/install)
## Tests

### Lint & Test

## creating sqlite.so
```bash
bash ./pre-commit.sh
```
gcc -c -Wall -Werror -fpic sqlite3.c
gcc -shared -o sqlite3.so sqlite3.o

### Set screenshot asserts

```
flutter test --update-goldens
```

## Extras

### Add pre-commit hook

```bash
ln -s $(pwd)/pre-commit.sh $(pwd)/.git/hooks/pre-commit
chmod +x $(pwd)/.git/hooks/pre-commit
```

### Jetbrains flutter plugin:

https://plugins.jetbrains.com/plugin/9212-flutter/versions

## db path
### Db path

~/Library/Containers/uk.me.max.notifi/Data/Documents/notifications.db

## gh .env secrets
### GH .env secret to base64 string

cat .env | openssl base64

## set screenshot asserts
```
flutter test --update-goldens
```

## pre-commit hook
```bash
cp pre-commit.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
```

4 changes: 3 additions & 1 deletion pre-commit.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/bin/bash

# format
if ! flutter format lib --set-exit-if-changed; then
exit 1
fi

if ! flutter format test --set-exit-if-changed; then
exit 1
fi

# run lint
if ! flutter analyze; then
exit 1
fi

# run tests
flutter test

0 comments on commit 072d22a

Please sign in to comment.