Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copyright years update #25455

Closed
wants to merge 3 commits into from
Closed

Conversation

dnaeon
Copy link
Contributor

@dnaeon dnaeon commented May 15, 2015

This PR updates the copyright years.

Actual script used for generating the copyright years based on the Git commit logs can be found below.

#!/usr/bin/env sh                                                                                                                                                              

PATTERN='// Copyright ([0-9\-]*) The Rust Project Developers. See the COPYRIGHT'                                                                                               
REPO_SRC='/home/mnikolov/PROJECTS/rust/src'                                                                                                                             

for f in $( egrep --recursive --files-with-matches "${PATTERN}" "${REPO_SRC}" ); do                                                                                            
    last_copyright_year=$( egrep "${PATTERN}" ${f} | awk '{ print $3 }' )                                                                                                      
    last_commit_year=$( git log -1 ${f} | grep 'Date' | awk '{ print $6 }' )                                                                                                   
    if [ "${last_copyright_year}" != "${last_commit_year}" ]; then                                                                                                             
        first_year=$( echo "${last_copyright_year}" | cut -d '-' -f 1 | sed -e 's|-||g' )                                                                                      
        new_copyright_year="${first_year}-${last_commit_year}"                                                                                                                 
        echo "Updating copyright years for ${f} to ${new_copyright_year} ..."                                                                                                  
        sed -i "s|Copyright ${last_copyright_year}|Copyright ${new_copyright_year}|g" ${f}                                                                                     
    fi                                                                                                                                                                         
done

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @huonw (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@dnaeon
Copy link
Contributor Author

dnaeon commented May 15, 2015

Build fails because of incorrect license, although license appears to be correct.

cfg: no pandoc found, omitting PDF and EPUB docs
cfg: including test rules
cfg: javac not available, skipping lexer test...
check: formatting
/home/travis/build/rust-lang/rust/src/test/run-pass/issue-9382.rs:1: incorrect license

Any ideas why license appears as incorrect?

@dnaeon
Copy link
Contributor Author

dnaeon commented May 15, 2015

License header fixed, test passed.

@frewsxcv
Copy link
Member

Relevant discussion from a few months ago:

#9070

in particular:

#9070 (comment)

@dnaeon
Copy link
Contributor Author

dnaeon commented May 16, 2015

@frewsxcv I wasn't aware that this has been discussed already, thanks for the links. I think we can close this PR.

@dnaeon dnaeon closed this May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants