mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 14:08:06 -05:00
### Purpose
This PR parses the output of `go mod graph` and updates the copyright
list in our [about
modal](486eebc4ac/gui/default/syncthing/core/aboutModalView.html (L38)).
If there are no changes, the program is silent. Otherwise, it reports
what additions, and deletions it made. It does not rewrite existing
copyright notices, but it does remove notices that we no longer use, as
well as add new ones.
It uses a GitHub API to try to determine the copyright string in the
license file. If one is not found, it defaults to `Copyright ©
<this_year> the <owner/repo> authors`. If a proper copyright is found,
simply update the notice in `aboutModalView.html`, and it will be used.
37 lines
511 B
Bash
Executable File
37 lines
511 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
IFS=$'\n\t'
|
|
|
|
script() {
|
|
name="$1"
|
|
shift
|
|
go run "script/$name.go" "$@"
|
|
}
|
|
|
|
build() {
|
|
go run build.go "$@"
|
|
}
|
|
|
|
case "${1:-default}" in
|
|
test)
|
|
LOGGER_DISCARD=1 build test
|
|
;;
|
|
|
|
bench)
|
|
LOGGER_DISCARD=1 build bench
|
|
;;
|
|
|
|
prerelease)
|
|
script authors
|
|
script copyrights
|
|
build weblate
|
|
pushd man ; ./refresh.sh ; popd
|
|
git add -A gui man AUTHORS
|
|
git commit -m 'chore(gui, man, authors): update docs, translations, and contributors'
|
|
;;
|
|
|
|
*)
|
|
build "$@"
|
|
;;
|
|
esac
|