Skip to content

Commit 966d6c9

Browse files
committed
refactor: move lockfile scripts from scripts/ to ansible/scripts/
Move generate_ansible_lockfile.sh and validate_lockfiles.sh under ansible/scripts/ to keep Ansible-related tooling together and avoid cluttering the repository root. Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
1 parent 04ef627 commit 966d6c9

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/generate_ansible_lockfile.sh renamed to ansible/scripts/generate_ansible_lockfile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
set -euo pipefail
33

44
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5-
AUTOWARE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
5+
ANSIBLE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
66
ROS_DISTRO="${ROS_DISTRO:-humble}"
77
ARCH=$(dpkg --print-architecture)
88

9-
OUTPUT_FILE="${AUTOWARE_DIR}/ansible/vars/locked-versions-${ROS_DISTRO}-${ARCH}.yaml"
9+
OUTPUT_FILE="${ANSIBLE_DIR}/vars/locked-versions-${ROS_DISTRO}-${ARCH}.yaml"
1010

1111
get_package_version() {
1212
dpkg-query -W -f='${Version}' "$1" 2>/dev/null || echo "not-installed"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33

44
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5-
AUTOWARE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
5+
ANSIBLE_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
66

77
validate_lockfile() {
88
local lockfile="$1"
@@ -40,7 +40,7 @@ main() {
4040
local exit_code=0
4141
local found=false
4242

43-
for lockfile in "${AUTOWARE_DIR}"/ansible/vars/locked-versions-*.yaml; do
43+
for lockfile in "${ANSIBLE_DIR}"/vars/locked-versions-*.yaml; do
4444
if [[ -f $lockfile ]]; then
4545
found=true
4646
if ! validate_lockfile "$lockfile"; then
@@ -50,7 +50,7 @@ main() {
5050
done
5151

5252
if [[ $found == "false" ]]; then
53-
echo "Error: No lock files found in ${AUTOWARE_DIR}/ansible/vars/" >&2
53+
echo "Error: No lock files found in ${ANSIBLE_DIR}/vars/" >&2
5454
exit 1
5555
fi
5656

0 commit comments

Comments
 (0)