|
| 1 | +#!/usr/bin/env bash |
| 2 | +# SPDX-FileCopyrightText: Copyright (c) 2016-2026 Objectionary.com |
| 3 | +# SPDX-License-Identifier: MIT |
| 4 | + |
| 5 | +set -euo pipefail |
| 6 | + |
| 7 | +ref_name=$1 |
| 8 | + |
| 9 | +git fetch --tags --force |
| 10 | +( |
| 11 | + printf 'Good news, we have just published the %d-th release ' \ |
| 12 | + "$(git tag | wc -l | xargs)" |
| 13 | + printf 'of [EO-to-Java compiler](https://github.com/objectionary/eo): ' |
| 14 | + printf '[%s](https://github.com/objectionary/eo/releases/tag/%s). ' \ |
| 15 | + "${ref_name}" "${ref_name}" |
| 16 | + printf 'At the moment, there are %dK lines-of code ' \ |
| 17 | + "$(echo "$(jq '.SUM.code' <cloc.json)" / 1000 | bc)" |
| 18 | + printf 'and %dK [hits-of-code](https://www.yegor256.com/2014/11/14/hits-of-code.html) ' \ |
| 19 | + "$(echo "$(hoc .)" / 1000 | bc)" |
| 20 | + printf 'in the [repository](https://github.com/objectionary/eo) on GitHub ' |
| 21 | + printf '(%d commits total); ' \ |
| 22 | + "$(git rev-list --count origin/master)" |
| 23 | + printf '[%d objects](https://github.com/objectionary/eo/tree/master/eo-runtime/src/main/eo/org/eolang) ' \ |
| 24 | + "$(find eo-runtime/src/main/eo -name '*.eo' | wc -l)" |
| 25 | + printf 'and [%d atoms](https://github.com/objectionary/eo/tree/master/eo-runtime/src/main/java/EOorg/EOeolang) ' \ |
| 26 | + "$(find eo-runtime/src/main/java/EOorg -name 'EO*.java' | wc -l)" |
| 27 | + printf 'in the [eo-runtime](https://github.com/objectionary/eo/tree/master/eo-runtime) module; ' |
| 28 | + printf '[%d issues](https://github.com/objectionary/eo/issues?q=is%%3Aopen+is%%3Aissue+label%%3A%%22help+wanted%%22) ' \ |
| 29 | + "$(curl --silent 'https://api.github.com/repos/objectionary/eo/issues?state=open&per_page=100&labels=help%20wanted' | jq length)" |
| 30 | + printf 'in the backlog, where your help is needed!\n\n' |
| 31 | + printf 'You may also be interested in helping us in these repositories:\n\n' |
| 32 | + for r in jeo-maven-plugin phino lints eoc; do |
| 33 | + printf ' - [%s](https://github.com/objectionary/%s) ' "${r}" "${r}" |
| 34 | + printf '([%d issues]' \ |
| 35 | + "$(curl --silent "https://api.github.com/repos/objectionary/${r}/issues?state=open&per_page=100&labels=help%20wanted" | jq length)" |
| 36 | + printf '(https://github.com/objectionary/%s/issues?q=is%%3Aopen+is%%3Aissue+label%%3A%%22help+wanted%%22))\n' \ |
| 37 | + "${r}" |
| 38 | + done |
| 39 | + printf '\nDo not forget to give us your GitHub stars, this is what we work for!' |
| 40 | +) > message.md |
0 commit comments