Skip to content

Commit 3bcd6e5

Browse files
nickboldtrhdh-bot
andauthored
chore: fix copyrights/exec lines for the various scripts; add one for running the cqa so we can check that locally too (#2067)
Signed-off-by: rhdh-bot service account <rhdh-bot@redhat.com> Co-authored-by: rhdh-bot service account <rhdh-bot@redhat.com>
1 parent 82e73ac commit 3bcd6e5

File tree

7 files changed

+45
-14
lines changed

7 files changed

+45
-14
lines changed

build/scripts/build-ccutil.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
3-
# Copyright (c) 2025 Red Hat, Inc.
3+
# Copyright (c) Red Hat, Inc.
44
# This program and the accompanying materials are made
55
# available under the terms of the Eclipse Public License 2.0
66
# which is available at https://www.eclipse.org/legal/epl-2.0/

build/scripts/build-cqa.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) Red Hat, Inc.
4+
# This program and the accompanying materials are made
5+
# available under the terms of the Eclipse Public License 2.0
6+
# which is available at https://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
10+
# Requires: Node.js
11+
12+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13+
pushd "${SCRIPT_DIR}" >/dev/null || exit
14+
node "cqa/index.js" --all # "$@"
15+
popd >/dev/null || exit

build/scripts/build-orchestrator.js

100644100755
File mode changed.

build/scripts/build.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
3-
# Copyright (c) 2023-2024 Red Hat, Inc.
3+
# Copyright (c) Red Hat, Inc.
44
# This program and the accompanying materials are made
55
# available under the terms of the Eclipse Public License 2.0
66
# which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -18,19 +18,19 @@ BRANCH="main"
1818

1919
while [[ "$#" -gt 0 ]]; do
2020
case $1 in
21-
'-b') BRANCH="$2"; shift 1;;
21+
'-b') BRANCH="$2"; shift 1;;
2222
esac
2323
shift 1
2424
done
2525

26-
rm -fr titles-generated/;
27-
mkdir -p titles-generated/"${BRANCH}";
26+
rm -fr titles-generated/;
27+
mkdir -p titles-generated/"${BRANCH}";
2828
echo "<html><head><title>Red Hat Developer Hub Documentation Preview - ${BRANCH}</title></head><body><ul>" > titles-generated/"${BRANCH}"/index.html;
2929
# exclude the rhdh-plugins-reference as it's embedded in the admin guide
3030
# shellcheck disable=SC2044,SC2013
3131
set -e
3232
for t in $(find titles -name master.adoc | sort -uV | grep -E -v "${EXCLUDED_TITLES}"); do
33-
d=${t%/*}; d=${d/titles/titles-generated\/${BRANCH}};
33+
d=${t%/*}; d=${d/titles/titles-generated\/${BRANCH}};
3434
CMD="asciidoctor \
3535
--backend=html5 \
3636
--destination-dir $d \
@@ -47,7 +47,7 @@ for t in $(find titles -name master.adoc | sort -uV | grep -E -v "${EXCLUDED_TIT
4747
-a toclevels=5 \
4848
-o index.html \
4949
$t";
50-
echo -e -n "\nBuilding $t into $d ...\n ";
50+
echo -e -n "\nBuilding $t into $d ...\n ";
5151
echo "${CMD}" | sed -r -e "s/\ +/ \\\\\n /g"
5252
$CMD
5353
# shellcheck disable=SC2013
@@ -67,14 +67,14 @@ if [[ $BRANCH == "pr-"* ]]; then
6767
# fetch the existing https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/index.html to add prs and branches
6868
curl -sSL https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/pulls.html -o titles-generated/pulls.html
6969
if [[ -z $(grep "./${BRANCH}/index.html" titles-generated/pulls.html) ]]; then
70-
echo "Building root index for $BRANCH in titles-generated/pulls.html ...";
70+
echo "Building root index for $BRANCH in titles-generated/pulls.html ...";
7171
echo "<li><a href=./${BRANCH}/index.html>${BRANCH}</a></li>" >> titles-generated/pulls.html
7272
fi
73-
else
73+
else
7474
# fetch the existing https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/index.html to add prs and branches
7575
curl -sSL https://redhat-developer.github.io/red-hat-developers-documentation-rhdh/index.html -o titles-generated/index.html
7676
if [[ -z $(grep "./${BRANCH}/index.html" titles-generated/index.html) ]]; then
77-
echo "Building root index for $BRANCH in titles-generated/index.html ...";
77+
echo "Building root index for $BRANCH in titles-generated/index.html ...";
7878
echo "<li><a href=./${BRANCH}/index.html>${BRANCH}</a></li>" >> titles-generated/index.html
7979
fi
8080
fi

build/scripts/cqa/index.js

100644100755
File mode changed.

build/scripts/lint-scripts.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) Red Hat, Inc.
4+
# This program and the accompanying materials are made
5+
# available under the terms of the Eclipse Public License 2.0
6+
# which is available at https://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
210
# lint-scripts.sh — Run shellcheck on CQA scripts
311
#
412
# Usage: ./build/scripts/lint-scripts.sh

build/scripts/update-cqa-resources.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) Red Hat, Inc.
4+
# This program and the accompanying materials are made
5+
# available under the terms of the Eclipse Public License 2.0
6+
# which is available at https://www.eclipse.org/legal/epl-2.0/
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
210
set -e
311

412
# Update CQA reference materials

0 commit comments

Comments
 (0)