Skip to content

Commit

Permalink
Relicense under Apache-2.0 OR MIT. (#844)
Browse files Browse the repository at this point in the history
* Switch to standard copyright headers with Apache-2.0 OR MIT.

* Add formatting check to the CI.

* Switch to an `AUTHORS` file.

* Switch to Apache 2.0 and MIT license files.

* Add a source of truth for licenses in the workspace `Cargo.toml`.

* Add cargo formatting.

* Add Apache 2.0 / MIT license info to the readme files.

* Remove outdated license info for `resvg` tests.

* Add changelog entry.

* Update `explorer-thumbnailer` install script publisher.
  • Loading branch information
xStrom authored Nov 11, 2024
1 parent 640bd94 commit cfb2ee5
Show file tree
Hide file tree
Showing 110 changed files with 1,787 additions and 1,910 deletions.
23 changes: 23 additions & 0 deletions .github/copyright.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# If there are new files with headers that can't match the conditions here,
# then the files can be ignored by an additional glob argument via the -g flag.
# For example:
# -g "!src/special_file.rs"
# -g "!src/special_directory"

# Check all the standard Rust source files
output=$(rg "^// Copyright (19|20)[\d]{2} (.+ and )?the Resvg Authors( and .+)?$\n^// SPDX-License-Identifier: Apache-2\.0 OR MIT$\n\n" --files-without-match --multiline -g "*.{rs,c,cpp,h}" .)

if [ -n "$output" ]; then
echo -e "The following files lack the correct copyright header:\n"
echo $output
echo -e "\n\nPlease add the following header:\n"
echo "// Copyright $(date +%Y) the Resvg Authors"
echo "// SPDX-License-Identifier: Apache-2.0 OR MIT"
echo -e "\n... rest of the file ...\n"
exit 1
fi

echo "All files have correct copyright headers."
exit 0
24 changes: 24 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ env:
CARGO_TERM_COLOR: always

jobs:
fmt:
name: formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# TODO: Enable this when more of the Linebender CI has been applied.
#- name: install stable toolchain
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: ${{ env.RUST_STABLE_VER }}
# components: rustfmt

- name: cargo fmt
run: cargo fmt --all --check

- name: install ripgrep
run: |
sudo apt update
sudo apt install ripgrep
- name: check copyright headers
run: bash .github/copyright.sh

build:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is the list of Resvg's significant contributors.
#
# This does not necessarily list everyone who has contributed code,
# especially since many employees of one corporation may be contributing.
# To see the full list of contributors, see the revision history in
# source control.
Yevhenii Reizner
Laurenz Stampfl
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
This changelog also contains important changes in dependencies.

## [Unreleased]
### Changed
- License to `Apache-2.0 OR MIT`.
See [resvg#838](https://github.com/linebender/resvg/issues/838) for more information.

## [0.44.0] - 2024-09-28
### Added
Expand Down
239 changes: 237 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cfb2ee5

Please sign in to comment.