Skip to content

Commit

Permalink
Set up license guard, add license headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Oct 9, 2023
1 parent e8f85a4 commit fe44704
Show file tree
Hide file tree
Showing 16 changed files with 147 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/other/licenserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

# File format: see https://github.com/apache/skywalking-eyes/blob/main/test/testdata/.licenserc_language_config_test.yaml

header:
license:
spdx-id: MPL-2.0

paths:
- '**/*.rs'
- '**/*.gd'
- '**/*.sh'
- '**/*.md'
- '.github/**/*.yml'

paths-ignore:
- 'ReadMe.md'
- '.github/ISSUE_TEMPLATE'

comment: on-failure

language:
GDScript:
extensions: ['.gd', '.sh']
comment_style_id: 'Hashtag'
Rust:
extensions: ['.rs']
comment_style_id: 'SlashAsterisk'
38 changes: 36 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

name: "Deploy to GitHub Pages"

on:
push:
branches: [master]
pull_request:

env:
# Use fixed versions for now, replace with 'latest' to auto-use latest
Expand All @@ -14,12 +19,13 @@ env:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
# contents: read
contents: write
pages: write
id-token: write

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -48,9 +54,37 @@ jobs:
run: mdbook build

- name: "Upload Pages artifact"
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v1
with:
path: book

- name: "Deploy to GitHub Pages"
if: github.ref == 'refs/heads/master'
uses: actions/deploy-pages@v2


license-guard:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

- name: "Check license headers"
uses: apache/skywalking-eyes/[email protected]
with:
# log: debug # optional: set the log level. The default value is `info`.
config: .github/other/licenserc.yml
# token: # optional: the token that license eye uses when it needs to comment on the pull request.
# Set to empty ("") to disable commenting on pull request. The default value is ${{ github.token }}
# mode: # optional: Which mode License-Eye should be run in. Choices are `check` or `fix`. The default value is `check`.
# mode: check
mode: fix

- name: "Commit changes"
uses: EndBug/add-and-commit@v9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
author_name: 'Godot-Rust Automation'
author_email: '[email protected]'
message: 'Auto-apply license headers'
4 changes: 4 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

[book]
authors = ["The godot-rust developers"]
multilingual = false
Expand Down
6 changes: 6 additions & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Summary

- [Introduction](index.md)
Expand Down
6 changes: 6 additions & 0 deletions src/contribute/conventions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Code and API conventions


Expand Down
5 changes: 5 additions & 0 deletions src/contribute/dev-tools.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Dev tools and testing

Expand Down
6 changes: 6 additions & 0 deletions src/contribute/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Contributing to gdext

This chapter provides deeper information for people who are interested in contributing to the library.
Expand Down
6 changes: 6 additions & 0 deletions src/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Introduction

Welcome to the **godot-rust book**! This is a work-in-progress user guide for **gdext**, the Rust binding for Godot 4.
Expand Down
6 changes: 6 additions & 0 deletions src/intro/hello-world.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Hello World

This page shows you how to develop your own small extension library and load it from Godot.
Expand Down
6 changes: 6 additions & 0 deletions src/intro/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Getting Started

This chapter guides you through the process of setting up **gdext** and developing your first application with it.
Expand Down
6 changes: 6 additions & 0 deletions src/intro/objects.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Managing objects in Rust

This chapter covers the most central mechanism of the Rust bindings -- one that will accompany you from the Hello-World
Expand Down
6 changes: 6 additions & 0 deletions src/intro/setup.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Setup

To use gdext, we need a few technologies.
Expand Down
6 changes: 6 additions & 0 deletions src/toolchain/compatibility.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Compatibility and stability

The gdext library supports all stable Godot releases starting from Godot 4.0.
Expand Down
6 changes: 6 additions & 0 deletions src/toolchain/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ as it includes the required `com.apple.security.get-task-allow` key not currentl

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand Down
6 changes: 6 additions & 0 deletions src/toolchain/godot-version.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Selecting a Godot version

By default, `gdext` uses the latest stable release of Godot. This is desired in most cases, but it means that you cannot run your extension in
Expand Down
6 changes: 6 additions & 0 deletions src/toolchain/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<!--
~ This Source Code Form is subject to the terms of the Mozilla Public
~ License, v. 2.0. If a copy of the MPL was not distributed with this
~ file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->

# Toolchain

Beyond Rust, there are quite a few things that are handy to know when working with Godot. This chapter goes into more detail
Expand Down

0 comments on commit fe44704

Please sign in to comment.