This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-connectors.git
The following commit(s) were added to refs/heads/main by this push:
new ee3a99b67 remove unused scripts (#646)
ee3a99b67 is described below
commit ee3a99b6770a3c245ad8dc9903b2360cbe750686
Author: PJ Fanning <[email protected]>
AuthorDate: Mon May 6 10:16:44 2024 +0100
remove unused scripts (#646)
---
scripts/authors.scala | 72 --------------------------------------------
scripts/gh-detect-changes.sh | 34 ---------------------
2 files changed, 106 deletions(-)
diff --git a/scripts/authors.scala b/scripts/authors.scala
deleted file mode 100755
index 25348c832..000000000
--- a/scripts/authors.scala
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-exec scala "$0" "$@"
-!#
-
-/*
- * Usage:
- * authors.scala tag1 tag2
- *
- * or if on non unixy os:
- * scala authors.scala tag1 tag2
- *
- * requires scala 2.13.x+ and command line git on path
- *
- * install scala on the path with sdkman:
- * sdk install scala
- */
-
-import scala.sys.process._
-
-require(args.length == 2, "usage: authors prevTag currTag")
-
-val gitCmd = "git log --no-merges --shortstat -z --minimal -w -C " + args(0) +
".." + args(1)
-
-case class Stats(name: String, email: String, commits: Int = 0, inserts: Int =
0, deletes: Int = 0, filesChanged: Int = 0)
-
-val AuthorExp = """Author: (.*) <([^>]+)>""".r
-val FilesExp = """(\d+)\sfile[s]? changed""".r
-val InsertionsExp = """(\d+)\sinsertion[s]?\(\+\)""".r
-val DeletionsExp = """(\d+)\sdeletion[s]?\(-\)""".r
-
-val entries = gitCmd.lazyLines_!.foldLeft("")(_ + "\n" + _).split('\u0000')
-
-val map = entries.foldLeft(Map.empty[String, Stats]) { (map, entry) =>
- val lines = entry.trim.split('\n')
- val authorLine = lines(1)
- val summary = lines.last
-
- val statsEntry = authorLine match {
- case AuthorExp(name, email) =>
- map.get(name.toLowerCase).orElse {
- // look for same email, but different name
- map.values.find(_.email.equalsIgnoreCase(email)).orElse {
- Some(Stats(name, email))
- }
- }
- case _ =>
- println(s"Unparseable author line: \n$authorLine\n in entry $entry")
- None
- }
-
- val updatedEntry =
- statsEntry.map(entry =>
summary.trim.split(',').map(_.trim).foldLeft(entry.copy(commits = entry.commits
+ 1)) {
- case (entry, FilesExp(f)) => entry.copy(filesChanged =
entry.filesChanged + f.toInt)
- case (entry, InsertionsExp(a)) => entry.copy(inserts = entry.inserts +
a.toInt)
- case (entry, DeletionsExp(d)) => entry.copy(deletes = entry.deletes +
d.toInt)
- case (entry, uff) =>
- println(s"Couldn't parse summary section for $entry '$uff'")
- entry
- })
-
- updatedEntry.fold(
- map
- )(entry => map + (entry.name.toLowerCase -> entry))
-}
-
-val sorted = map.values.toSeq.sortBy(s => (s.commits, s.inserts +
s.deletes)).reverse
-
-println("commits added removed")
-sorted.foreach { entry =>
- println("%7d%7d%9d %s".format(entry.commits, entry.inserts, entry.deletes,
entry.name))
-}
-
diff --git a/scripts/gh-detect-changes.sh b/scripts/gh-detect-changes.sh
deleted file mode 100755
index 12b42b2f0..000000000
--- a/scripts/gh-detect-changes.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# set -x
-
-CONNECTOR=$1
-
-if [ "$GITHUB_EVENT_NAME" == "pull_request" ]
-then
- COMPARE_TO="origin/${GITHUB_BASE_REF}"
-else
- # for non-pr (main branch) builds, comparison for changes is made against
the previous commit,
- # which might be:
- # * merge commit, then HEAD^ is the last commit before branching out
- # * squash commit, then HEAD^ is the previous state of main branch
- COMPARE_TO="HEAD^"
-fi
-
-git diff "$COMPARE_TO" --exit-code --quiet "${CONNECTOR}" build.sbt project/
.github/workflows/
-DIFF_EXIT_CODE=$?
-
-# Setting the `execute_build` env variable for other job steps to use
-#
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
-if [ "$GITHUB_EVENT_NAME" == "schedule" ]
-then
- echo "Building everything as it is a scheduled build"
- echo "execute_build=true" >> $GITHUB_ENV
-elif [ "$DIFF_EXIT_CODE" -eq 1 ]
-then
- echo "Changes in Connector ${CONNECTOR}"
- echo "execute_build=true" >> $GITHUB_ENV
-else
- echo "No changes in Connector ${CONNECTOR}"
- echo "execute_build=false" >> $GITHUB_ENV
-fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]