Skip to content

Commit

Permalink
chore(github): various repo housekeeping (#193)
Browse files Browse the repository at this point in the history
* chore: remove deprecated `pr.py`

* chore: run deno task from project root

* chore: use deno as default formatter

* chore: catch invalid JSON

* fix(L10n): missing comma in events.json (JPN)

regression in #187

* ci(github): check JSON

* style: deno fmt

* build: insert final newline on generated JSON

* ci(github): enforce semantic pr for title and commits

* ci: lint ts, md, json, schema files
  • Loading branch information
scarf005 committed Apr 14, 2023
1 parent 1daf321 commit 43ff2c4
Show file tree
Hide file tree
Showing 23 changed files with 142 additions and 190 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<!--
see: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

- fixes #
4 changes: 4 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://github.com/Ezard/semantic-prs#configuration

# Validate the PR title and all commit messages
titleAndCommits: true
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: linting

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1

- name: fmt
continue-on-error: true
run: deno fmt --check

- name: lint
continue-on-error: true
run: deno lint

- name: validate schema
continue-on-error: true
run: deno task schema:validate

- name: json syntax check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
"deno.enable": true,
"deno.lint": true,
"deno.config": "./deno.jsonc",
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno",
"[markdown]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"[jsonc]": {
"editor.defaultFormatter": "denoland.vscode-deno"
},
"conventionalCommits.scopes": [
Expand Down Expand Up @@ -78,4 +82,4 @@
"url": "./src/main/resources/localization/schemas/potions.json"
}
]
}
}
10 changes: 7 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Touhou Project

This project is a fan work based on Touhou Project and follows [Touhou Project Fan Work Guidelines][touhou].
This project is a fan work based on Touhou Project and follows
[Touhou Project Fan Work Guidelines][touhou].

## File Hierarchy

Expand All @@ -24,7 +25,9 @@ Source code of this project is licensed under [MIT][mit].

#### Images(`img/`)

With the confirmation from former project lead ([@lf201014](https:github.com/lf201014)), project resources are licensed under [CC BY-NC-SA 4.0][cc-by-nc-sa].
With the confirmation from former project lead
([@lf201014](https:github.com/lf201014)), project resources are licensed under
[CC BY-NC-SA 4.0][cc-by-nc-sa].

Project resources includes, but not limited to:

Expand All @@ -36,7 +39,8 @@ Project resources includes, but not limited to:

#### Audio(`audio/`)

`/master-spark.ogg` is modified from <https://freesound.org/people/Jacoder23/sounds/577081/>
`/master-spark.ogg` is modified from
<https://freesound.org/people/Jacoder23/sounds/577081/>

[mit]: LICENSES/MIT.txt
[touhou]: LICENSES/Touhou.md
Expand Down
46 changes: 30 additions & 16 deletions LICENSES/Touhou.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ original url: <https://touhou-project.news/guidelines_en/>

(UPDATE:November 10, 2020)

**In short, you may simply use your common sense if you're an individual or group (as opposed to a legal person) creating Fan Content (stuff you make based on Touhou Project) just for fun.**
**However, your Fan Content has to comply with the following rules:**
**In short, you may simply use your common sense if you're an individual or
group (as opposed to a legal person) creating Fan Content (stuff you make based
on Touhou Project) just for fun.** **However, your Fan Content has to comply
with the following rules:**

#### Your Fan Content should always have:

Expand All @@ -15,15 +17,18 @@ original url: <https://touhou-project.news/guidelines_en/>

- Anything that means to harm Touhou Project's reputation.
- Anything that infringes upon other intellectual property.
- Anything that means to mistake your Fan Content as one of the official Touhou Project titles.
- Anything that means to mistake your Fan Content as one of the official Touhou
Project titles.
- Anything that is extracted from official Touhou Project games.
- Ending scenes from official Touhou Project games.
- Anything that means to advertise personal beliefs beyond the bounds of fiction.
- Anything that means to advertise personal beliefs beyond the bounds of
fiction.
- Other Touhou Fan Content without the creator's permission.
- Excessive sexual content that is considered unlawful.
- Anything that promotes hatred against individuals or groups.

Though not relevant to Fan Content, posting or modifying photos of ZUN himself without ZUN's permission is prohibited.
Though not relevant to Fan Content, posting or modifying photos of ZUN himself
without ZUN's permission is prohibited.

#### Distribution

Expand All @@ -42,25 +47,34 @@ Examples (includes but not limited to):
- Touhou Digital Music Distribution
- Local events with admission fees on an individual scale

Browser games and mobile games can only be released as free-to-play games. Other forms of monetizations such as in-app advertisement and ad removal as an in-app purchase are allowed.
Fan-made video content, including let's play videos, may be uploaded through video-sharing platforms alike.
If you have obtained an explicit license from Team Shanghai Alice, please clarify such an association in your Fan Content.
You are solely responsible for any troubles caused by your Fan Content. Under no circumstances will Team Shanghai Alice be held responsible for any damages.
If you are a legal person creating Fan Content as a business activity, please contact us.
Browser games and mobile games can only be released as free-to-play games. Other
forms of monetizations such as in-app advertisement and ad removal as an in-app
purchase are allowed. Fan-made video content, including let's play videos, may
be uploaded through video-sharing platforms alike. If you have obtained an
explicit license from Team Shanghai Alice, please clarify such an association in
your Fan Content. You are solely responsible for any troubles caused by your Fan
Content. Under no circumstances will Team Shanghai Alice be held responsible for
any damages. If you are a legal person creating Fan Content as a business
activity, please contact us.

### Disclaimer

The intention of this guideline is to provide fan creators with a brief understanding of dos and don'ts in a lenient manner.
We do not answer any questions from individuals or groups regarding these guidelines and Fan Content policy.
We may contact you directly if we consider your Fan Content to be a serious violation of our guidelines.
We reserve the right to update this guideline without any notices.
The intention of this guideline is to provide fan creators with a brief
understanding of dos and don'ts in a lenient manner. We do not answer any
questions from individuals or groups regarding these guidelines and Fan Content
policy. We may contact you directly if we consider your Fan Content to be a
serious violation of our guidelines. We reserve the right to update this
guideline without any notices.

### About previous guidelines

Previous guidelines provided by ZUN are still considered as effective. For details that are not included in this guideline, please consult previous guidelines linked below.
Previous guidelines provided by ZUN are still considered as effective. For
details that are not included in this guideline, please consult previous
guidelines linked below.

- [Relevant Pages of Team Shanghai Alice's Fan Content Policy (Mr. Takker's website)](http://takker6.tada-katsu.com/t-081.html)
- [Details regarding "One-day Permission" and business activity (published on Dec. 10th, 2008)](https://kourindou.exblog.jp/9178184/)
- [Contact Form for Legal Person (published on Feb. 14th, 2011)](https://kourindou.exblog.jp/14218252/)

Special thanks to Mr. Takker for hosting Touhou Project creator guidelines ever since.
Special thanks to Mr. Takker for hosting Touhou Project creator guidelines ever
since.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
<h1>Marisa: Continued</h1>
</div>

a [re-continued][original] mod for [**Slay the Spire**][sts], which adds **[Marisa Kirisame
][marisa]** from Touhou Project as a playable character.
a [re-continued][original] mod for [**Slay the Spire**][sts], which adds
**[Marisa Kirisame][marisa]** from Touhou Project as a playable character.

> **Note** _**Marisa:** Continued_ is a fork of [STS_ThMod_MRS][original-github] mod. Credits goes to the original authors.
> **Note** _**Marisa:** Continued_ is a fork of [STS_ThMod_MRS][original-github]
> mod. Credits goes to the original authors.
## New features

Expand Down Expand Up @@ -63,7 +64,8 @@ subscribe [ModTheSpire][modthespire] and [BaseMod][basemod].

#### Compile from source

> **Warning** development environment is only tested on linux. may not work for other OS
> **Warning** development environment is only tested on linux. may not work for
> other OS
git clone repository `https://github.com/scarf005/Marisa.git`

Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ tasks.register("modthespire") {
version = File("docs/changelog/version.txt").readText().trim()
)

configFile.writeText(gson.toJson(config))
configFile.writeText(gson.toJson(config) + "\n")
}

tasks.jar {
Expand All @@ -129,9 +129,9 @@ tasks.jar {


tasks.register("changelog") {
description = "Write changelog to steam workshop description"
description = "Write changelog to steam workshop description"

dependsOn(tasks.jar)
file("$gameDir/${modID}/config.json")
.writeText(gson.toJson(Config(changeNote = changeBBCode)))
.writeText(gson.toJson(Config(changeNote = changeBBCode)) + "\n")
}
23 changes: 22 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
{
"fmt": { "options": { "semiColons": false } }
"tasks": {
"schema": "deno task --cwd localization/ schema",
"schema:vscode": "deno task --cwd localization/ schema:vscode",
"schema:validate": "deno task --cwd localization/ validate",
"schema:fmt": "deno task --cwd localization/ fmt"
},
"fmt": {
"options": { "semiColons": false },
"files": {
"exclude": ["src/main/kotlin/", "src/main/resources/img", "build/"]
}
},
"test": {
"files": {
"exclude": ["src/main/kotlin/", "src/main/resources/img", "build/"]
}
},
"bench": {
"files": {
"exclude": ["src/main/kotlin/", "src/main/resources/img", "build/"]
}
}
}
10 changes: 4 additions & 6 deletions docs/semver.ja.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# [セマンティック バージョニング](https://semver.org/lang/ja/)

[![en][icon-en]][en]
[![ja][icon-ja]][ja]
[![ko][icon-ko]][ko]
[![en][icon-en]][en] [![ja][icon-ja]][ja] [![ko][icon-ko]][ko]

[en]: ./semver.md
[icon-en]: https://img.shields.io/badge/lang-en-red?style=flat-square
Expand All @@ -11,9 +9,7 @@
[ko]: ./semver.ko.md
[icon-ko]: https://img.shields.io/badge/lang-ko-yellow?style=flat-square


機能:カード、アーティファクト、ポーション、イベントなど
変更範囲:
機能:カード、アーティファクト、ポーション、イベントなど 変更範囲:

- `github`: リポジトリ自体に関連する変更(主に [`.github`](/.github))
- `README`: [`README.md`](/README.md)に関連する変更
Expand All @@ -31,6 +27,7 @@ feat!: rework `Foo`
Foo now does bar
```

```
refactor!: change `ModId`
```
Expand Down Expand Up @@ -68,6 +65,7 @@ fix(L10n): missing `DESCRIPTION` on ENG/`Foo`
```
docs(README): add links
```

```
build(github): add gradle dependency
```
10 changes: 4 additions & 6 deletions docs/semver.ko.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# [유의적 버전 관리](https://semver.org/lang/ko/)

[![en][icon-en]][en]
[![ja][icon-ja]][ja]
[![ko][icon-ko]][ko]
[![en][icon-en]][en] [![ja][icon-ja]][ja] [![ko][icon-ko]][ko]

[en]: ./semver.md
[icon-en]: https://img.shields.io/badge/lang-en-red?style=flat-square
Expand All @@ -11,9 +9,7 @@
[ko]: ./semver.ko.md
[icon-ko]: https://img.shields.io/badge/lang-ko-yellow?style=flat-square


기능: 카드, 유물, 물약, 이벤트 등등
변경 범위:
기능: 카드, 유물, 물약, 이벤트 등등 변경 범위:

- `github`: 저장소 자체에 관련된 변경 (주로 [`.github`](/.github))
- `README`: [`README.md`](/README.md)에 관련된 변경
Expand All @@ -31,6 +27,7 @@ feat!: rework `Foo`
Foo now does bar
```

```
refactor!: change `ModId`
```
Expand Down Expand Up @@ -68,6 +65,7 @@ fix(L10n): missing `DESCRIPTION` on ENG/`Foo`
```
docs(README): add links
```

```
build(github): add gradle dependency
```
7 changes: 2 additions & 5 deletions docs/semver.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# [Semantic Versioning](https://semver.org)

[![en][icon-en]][en]
[![ja][icon-ja]][ja]
[![ko][icon-ko]][ko]
[![en][icon-en]][en] [![ja][icon-ja]][ja] [![ko][icon-ko]][ko]

[en]: ./semver.md
[icon-en]: https://img.shields.io/badge/lang-en-red?style=flat-square
Expand All @@ -11,8 +9,7 @@
[ko]: ./semver.ko.md
[icon-ko]: https://img.shields.io/badge/lang-ko-yellow?style=flat-square

feature: card, relic, potion, event, etc
scopes:
feature: card, relic, potion, event, etc scopes:

- `github`: changes related to repository (mostly [`.github`](/.github))
- `README`: changes to [`README.md`](/README.md)
Expand Down

0 comments on commit 43ff2c4

Please sign in to comment.