Skip to content

Commit e01de7b

Browse files
committed
---
yaml --- r: 213986 b: refs/heads/master c: 13bba76 h: refs/heads/master v: v3
1 parent 690d99b commit e01de7b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: bc8d862e595ffb957839aa144a2f1b5172fd3e1b
2+
refs/heads/master: 13bba763f52114455725de7df12dd85bf107b22e
33
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/etc/add-authors.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
4+
# file at the top-level directory of this distribution and at
5+
# http://rust-lang.org/COPYRIGHT.
6+
#
7+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10+
# option. This file may not be copied, modified, or distributed
11+
# except according to those terms.
12+
13+
# This script, invoked e.g. "add-authors.sh 1.0.0..rust-lang/master",
14+
# will merge new authors into AUTHORS.txt, obeying the mailmap
15+
# file.
16+
#
17+
# After running this script, run `git diff` to manually inspect
18+
# changes. If there are incorrect additions fix it by editing
19+
# .mailmap and re-running the script.
20+
21+
set -u -e
22+
23+
range="$1"
24+
25+
authors_file="./AUTHORS.txt"
26+
tmp_file="./AUTHORS.txt.tmp"
27+
old_authors="$(cat "$authors_file" | tail -n +2 | sed "/^$/d" | sort)"
28+
new_authors="$(git log "$range" --format="%aN <%aE>" | sort | uniq)"
29+
30+
echo "Rust was written by these fine people:\n" > "$tmp_file"
31+
echo "$old_authors\n$new_authors" | sort | uniq >> "$tmp_file"
32+
mv -f "$tmp_file" "$authors_file"

0 commit comments

Comments
 (0)