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

Happy new year 2019 #11997

Merged
merged 8 commits into from Jan 30, 2019

Conversation

Projects
None yet
6 participants
@Quetzacoalt91
Copy link
Member

Quetzacoalt91 commented Jan 2, 2019

Questions Answers
Branch? develop
Description? This is that time of the year again, where we must update our license header. 🍾
Type? refacto
Category? CO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test? Only the file headers have changed. Features remain untouched.

This change is Reviewable

@mickaelandrieu

This comment has been minimized.

Copy link
Contributor

mickaelandrieu commented Jan 2, 2019

Sounds like Symfony project have updated again his file header: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/BrowserKit/Client.php#L5

Never too late to do the right thing 👼

imho only the license file should change if you want to keep the date on it, but according to the OSI, this is not a requirement? /c @ttoine

I won't reject this pull request, it's up to you, mates 👍

@Quetzacoalt91 Quetzacoalt91 dismissed stale reviews from matks and PierreRambaud via 9fe7e9a Jan 2, 2019

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:new-year-2019 branch 2 times, most recently from 9fe7e9a to 3a5f5f1 Jan 2, 2019

@@ -56,7 +56,7 @@ class UpdateLicensesCommand extends Command
* needs please refer to http://www.prestashop.com for more information.

This comment has been minimized.

@MathiasReker

MathiasReker Jan 3, 2019

Contributor

Missing s in protocol -> https://www.prestashop.com

@MathiasReker

This comment has been minimized.

Copy link
Contributor

MathiasReker commented Jan 3, 2019

#!/bin/sh
updateYear() {
  NEW_YEAR=`date +'%Y'`
  BRANCH_NAME="showcase-happy-new-year-$NEW_YEAR"
  if [[ ! `git branch --list "$BRANCH_NAME"` ]]; then
    git checkout "develop"
    git checkout -b "$BRANCH_NAME"
    array=('PHP' 'JS' 'TXT' 'TPL' 'CSS' 'SCSS' 'MD' 'TWIG' 'VUE')
    for FILE_TYPES in "${array[@]}"
    do
      OLD_YEAR=2014 #check years older than last year
      while [[ $OLD_YEAR < $NEW_YEAR ]]; do
        find ./ -iname "*.$FILE_TYPES" -exec sed -i "/$OLD_YEAR PrestaShop/ s/$OLD_YEAR PrestaShop/$NEW_YEAR PrestaShop/g" '{}' ';'
        OLD_YEAR=`expr $OLD_YEAR + 1`
      done
      if ! git diff-index --quiet HEAD --; then
        git add -A
        git commit -m "Update license of $FILE_TYPES files"
      fi
    done
  fi
  echo ""
  echo "Done!"
}
updateYear

I think you missed some file extensions and maybe years older than 2018? This shell script explain what I mean :)

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:new-year-2019 branch from 75f8032 to 174beaa Jan 3, 2019

@Quetzacoalt91

This comment has been minimized.

Copy link
Member Author

Quetzacoalt91 commented Jan 8, 2019

The command prestashop:license:update checks the whole LICENSE block exists, adds it if it is missing or replaces it otherwise.

This allow us to not take care about the previous year, it should get the 2019 at all times.

I think you missed some file extensions

With the extension, do you have a concrete example in mind by any chance?

@MathiasReker

This comment has been minimized.

Copy link
Contributor

MathiasReker commented Jan 8, 2019

\docs\licences\LICENSE.txt
\LICENCE.md
\docs\CHANGELOG.txt
\admin-dev\themes\new-theme\scss\components\_form.scss

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:new-year-2019 branch from 174beaa to 306ab35 Jan 10, 2019

@mickaelandrieu

This comment has been minimized.

Copy link
Contributor

mickaelandrieu commented Jan 17, 2019

Hi @Quetzacoalt91,

would you mind to rebase so I can merge this one?

Thanks mate 👍

@Quetzacoalt91

This comment has been minimized.

Copy link
Member Author

Quetzacoalt91 commented Jan 21, 2019

PR rebased

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:new-year-2019 branch from 306ab35 to 50312f1 Jan 21, 2019

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:new-year-2019 branch from 50312f1 to 278c32a Jan 30, 2019

@Quetzacoalt91 Quetzacoalt91 merged commit aec97dd into PrestaShop:develop Jan 30, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Quetzacoalt91 Quetzacoalt91 deleted the Quetzacoalt91:new-year-2019 branch Jan 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment