Skip to content

Commit 316a782

Browse files
committed
fix: shell script linter warnings
- Replace useless cat with input redirection in release.sh and tag.sh - Use find instead of ls for file listing in release.sh Signed-off-by: Jose Alekhinne <alekhinejose@gmail.com>
1 parent ca1023d commit 316a782

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

hack/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if [ ! -f "$ROOT_DIR/VERSION" ]; then
5757
exit 1
5858
fi
5959

60-
VERSION="v$(cat "$ROOT_DIR/VERSION" | tr -d '[:space:]')"
60+
VERSION="v$(tr -d '[:space:]' < "$ROOT_DIR/VERSION")"
6161
# -----------------------------------------------------------------------------
6262

6363
# Derived values
@@ -179,7 +179,7 @@ echo " - Tag: ${TAG_NAME}"
179179
echo " - Tag: latest -> ${TAG_NAME}"
180180
echo ""
181181
echo "Built artifacts in dist/:"
182-
ls -1 dist/ctx-* 2>/dev/null | sed 's/^/ /'
182+
find dist -maxdepth 1 -name 'ctx-*' 2>/dev/null | sed 's/^/ /'
183183
echo ""
184184
echo "Next step:"
185185
echo ""

hack/tag.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [ ! -f "$ROOT_DIR/VERSION" ]; then
2626
exit 1
2727
fi
2828

29-
VERSION="v$(cat "$ROOT_DIR/VERSION" | tr -d '[:space:]')"
29+
VERSION="v$(tr -d '[:space:]' < "$ROOT_DIR/VERSION")"
3030

3131
echo "Creating tag: $VERSION"
3232

0 commit comments

Comments
 (0)