Skip to content

Commit 40c705d

Browse files
committed
#31 mark deploy.sh executable
ref chadsmith cs01 https://stackoverflow.com/a/56049405
1 parent 9d39e32 commit 40c705d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import subprocess
2626
from signals import signal_new_repo
2727
import string
28+
from pathlib import Path
29+
import stat
2830

2931
"""
3032
Create automated deploys for repos both new and existing
@@ -609,10 +611,12 @@ def add_flask_quickstart():
609611
) as fp:
610612
fp.write(deploy_sh)
611613

614+
# Mark deploy.sh execute bit
615+
f = Path(f"{BASE_PATH}tmp-cloned-repos/{APP_NAME}/.container-hosting/deploy.sh")
616+
f.chmod(f.stat().st_mode | stat.S_IEXEC)
617+
612618
index = repo.index
613-
index.add(
614-
[f"{BASE_PATH}tmp-cloned-repos/{APP_NAME}/.container-hosting/deploy.sh"]
615-
)
619+
index.add([f"{BASE_PATH}tmp-cloned-repos/{APP_NAME}/.container-hosting/deploy.sh"])
616620
index.commit("Added deploy.sh file")
617621

618622
# Create release.yml github workflow

0 commit comments

Comments
 (0)