From ae381fe3e5e211f3a6618025ad33eb22618b169e Mon Sep 17 00:00:00 2001 From: nicxvan Date: Tue, 8 Jul 2025 00:18:23 -0400 Subject: [PATCH 1/2] First round --- .gitignore | 1 + cores.rb | 11 ++++---- fullRun.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ versionlinks.md | 39 ++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+), 5 deletions(-) create mode 100755 fullRun.sh create mode 100644 versionlinks.md diff --git a/.gitignore b/.gitignore index 9b126f5c24..9ed06792f2 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,6 @@ pip-log.txt # git repo that we parsing drupal/ pages/ +contributors/ cores.db diff --git a/cores.rb b/cores.rb index f477db0d7d..455e63b6d0 100755 --- a/cores.rb +++ b/cores.rb @@ -1,7 +1,7 @@ #!/usr/bin/env ruby -log_args = ARGV[0] || '--since=2011-03-09' -git_command = 'git --git-dir=drupal/.git --work-tree=drupal log 8.0.x ' + log_args + ' -s --format=%s' +log_args = ARGV[0] || '' +git_command = 'git --git-dir=drupal/.git --work-tree=drupal log ' + log_args + ' -s --format=%s' Encoding.default_external = Encoding::UTF_8 require 'erb' @@ -51,7 +51,7 @@ DrupalCores - + @@ -59,9 +59,10 @@
- View on GitHub + View original on GitHub + Original author Eric J. Duran

DrupalCores

-

A very basic table of all contributors to Drupal 8 Core

+

A very basic table of all contributors to Drupal Core

diff --git a/fullRun.sh b/fullRun.sh new file mode 100755 index 0000000000..8769274b57 --- /dev/null +++ b/fullRun.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +# git pull + +echo "Updating Drupal" + +if [ ! -d "./drupal" ]; then + git clone git@git.drupal.org:project/drupal.git +else + cd ./drupal + git checkout 11.x + git fetch + git rebase + cd ../ +fi + +docker run --rm -it -v "$PWD":/data ruby bash -c 'cd /data && ./cores.rb ${drupalVersions[$i]} > ./contributors/main.html' + +declare -a drupalVersions=( + "11.2.2" + "10.5.1" + "9.5.11" + "8.9.20" + "7.103" + "6.38" + "5.23" + "4.7.11" + ) + +declare -a versionDates=( + "2024-05-04" + "2022-01-28" + "2019-10-10" + "2013-06-24" + "2008-07-02" + "2006-11-13" + "2006-10-31" + "2005-03-07" + ) + + arraylength=${#drupalVersions[@]} + + # use for loop to read all values and indexes + for (( i=0; i<${arraylength}; i++ )); + do + echo "Version ${drupalVersions[$i]} released ${versionDates[$i]}" + cd ./drupal + git switch ${drupalVersions[$i]}-version 2>/dev/null || git switch -c ${drupalVersions[$i]}-version tags/${drupalVersions[$i]} + cd .. + docker run --rm -it -v "$PWD":/data ruby bash -c "cd /data && ./cores.rb ${drupalVersions[$i]} --since=${versionDates[$i]} > ./contributors/${drupalVersions[$i]}.html" + done + +git switch 4.3.2-version 2>/dev/null || git switch -c 4.3.2-version tags/4.3.2 +docker run --rm -it -v "$PWD":/data ruby bash -c 'cd /data && ./cores.rb > ./contributors/4.3.2.html' +git checkout 11.x + +echo "" > ./contributors/index.html +echo "" >> ./contributors/index.html + +sudo chmod -R 777 contributors +sudo chown -R nic:nic contributors diff --git a/versionlinks.md b/versionlinks.md new file mode 100644 index 0000000000..7fc59cd65f --- /dev/null +++ b/versionlinks.md @@ -0,0 +1,39 @@ +#!/bin/bash + +# Before 4.3.2 + +# Check out 4.7.11 +# 7 Mar, 2005 +# https://www.drupal.org/project/drupal/releases/4.3.2 + +# Check out 5.23 +# 31 Oct, 2006 +# https://www.drupal.org/project/drupal/releases/5.0-beta1 + +# Check out 6.38 +# 13 Nov, 2006 +# https://www.drupal.org/project/drupal/releases/6.x-dev + +# Check out 7.103 +# 2 Jul, 2008 +# https://www.drupal.org/project/drupal/releases/7.x-dev + +# Check out 8.9.20 +# 24 Jun, 2013 +# https://www.drupal.org/project/drupal/releases/8.0-alpha2 + +# Check out 9.5.11 +# 10 Oct, 2019 +# https://www.drupal.org/project/drupal/releases/9.0.x-dev + +# Check out 10.5.1 +# 28 Jan, 2022 +# https://www.drupal.org/project/drupal/releases/10.0.0-alpha1 + +# Checkout 11.2.2 +# 4 May, 2024 +# https://www.drupal.org/project/drupal/releases/11.0.x-dev + + +# All history +git checkout 11.x From f091c4e070f3425cef9e100535894b0773f45943 Mon Sep 17 00:00:00 2001 From: nicxvan Date: Tue, 8 Jul 2025 00:27:49 -0400 Subject: [PATCH 2/2] Fix older --- cores.rb | 2 ++ fullRun.sh | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cores.rb b/cores.rb index 455e63b6d0..79e911fe24 100755 --- a/cores.rb +++ b/cores.rb @@ -3,6 +3,8 @@ log_args = ARGV[0] || '' git_command = 'git --git-dir=drupal/.git --work-tree=drupal log ' + log_args + ' -s --format=%s' +# File.write("contributors/output.txt", git_command, mode: "a") + Encoding.default_external = Encoding::UTF_8 require 'erb' require 'yaml' diff --git a/fullRun.sh b/fullRun.sh index 8769274b57..eee173fc46 100755 --- a/fullRun.sh +++ b/fullRun.sh @@ -14,7 +14,7 @@ else cd ../ fi -docker run --rm -it -v "$PWD":/data ruby bash -c 'cd /data && ./cores.rb ${drupalVersions[$i]} > ./contributors/main.html' +docker run --rm -it -v "$PWD":/data ruby bash -c 'cd /data && ./cores.rb > ./contributors/main.html' declare -a drupalVersions=( "11.2.2" @@ -47,10 +47,12 @@ declare -a versionDates=( cd ./drupal git switch ${drupalVersions[$i]}-version 2>/dev/null || git switch -c ${drupalVersions[$i]}-version tags/${drupalVersions[$i]} cd .. - docker run --rm -it -v "$PWD":/data ruby bash -c "cd /data && ./cores.rb ${drupalVersions[$i]} --since=${versionDates[$i]} > ./contributors/${drupalVersions[$i]}.html" + docker run --rm -it -v "$PWD":/data ruby bash -c "cd /data && ./cores.rb --since=${versionDates[$i]} > ./contributors/${drupalVersions[$i]}.html" done +cd ./drupal git switch 4.3.2-version 2>/dev/null || git switch -c 4.3.2-version tags/4.3.2 +cd .. docker run --rm -it -v "$PWD":/data ruby bash -c 'cd /data && ./cores.rb > ./contributors/4.3.2.html' git checkout 11.x