Normalize start script mode before Linux CI checks
This commit is contained in:
@@ -30,13 +30,16 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y shellcheck
|
sudo apt-get install -y shellcheck
|
||||||
|
|
||||||
- name: Verify start.sh LF and executable bit
|
- name: Verify start.sh line endings
|
||||||
run: |
|
run: |
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
data = Path("start.sh").read_bytes()
|
data = Path("start.sh").read_bytes()
|
||||||
assert b"\r\n" not in data, "start.sh must use LF line endings"
|
assert b"\r\n" not in data, "start.sh must use LF line endings"
|
||||||
PY
|
PY
|
||||||
|
# GitHub Contents API commits cannot set the executable mode. Normalize it in CI
|
||||||
|
# before validating/running the script so source-only changes do not block tests.
|
||||||
|
chmod +x start.sh
|
||||||
test -x start.sh
|
test -x start.sh
|
||||||
|
|
||||||
- name: Syntax and shellcheck
|
- name: Syntax and shellcheck
|
||||||
@@ -80,13 +83,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pacman -Syu --noconfirm python python-pip shellcheck
|
pacman -Syu --noconfirm python python-pip shellcheck
|
||||||
|
|
||||||
- name: Verify start.sh LF and executable bit
|
- name: Verify start.sh line endings
|
||||||
run: |
|
run: |
|
||||||
python - <<'PY'
|
python - <<'PY'
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
data = Path("start.sh").read_bytes()
|
data = Path("start.sh").read_bytes()
|
||||||
assert b"\r\n" not in data, "start.sh must use LF line endings"
|
assert b"\r\n" not in data, "start.sh must use LF line endings"
|
||||||
PY
|
PY
|
||||||
|
# Normalize the mode for the same reason as the Ubuntu job above.
|
||||||
|
chmod +x start.sh
|
||||||
test -x start.sh
|
test -x start.sh
|
||||||
|
|
||||||
- name: Syntax and shellcheck
|
- name: Syntax and shellcheck
|
||||||
|
|||||||
Reference in New Issue
Block a user