Skip to content

Commit

Permalink
Allow running release script without TTY (#3200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Derkades authored Jan 18, 2023
1 parent f93a7f8 commit b051fb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev/scripts/release-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ mkdir -p release
rm -f release/*.zip
rm -f release/*.tar.xz
rm -rf release/upgrade_temp # In case a previous run failed
export PYTHONUNBUFFERED=1
python3 dev/scripts/release.py
rm -rf release/upgrade_temp
2 changes: 2 additions & 0 deletions dev/scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def create_archives(source_dir: str, archive_name: str):
previous_tag_command = ['git', 'describe', '--abbrev=0', '--tags']
previous_tag = subprocess.check_output(previous_tag_command, shell=False)[:-1].decode()

print('Creating files for upgrade from', previous_tag)

# Find all files changed between previous tag and HEAD (current state)
changed_command = ['git', 'diff', previous_tag, 'HEAD', '--name-only', '--diff-filter=d']
changed_files = subprocess.check_output(changed_command, shell=False)[:-1].decode()
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
set -e
docker run -it --rm -u $(id -u) -v "$(pwd):/data" --entrypoint="/data/dev/scripts/release-entrypoint.sh" namelessmc/php:dev
docker run --rm -u $(id -u) -v "$(pwd):/data" --entrypoint="/data/dev/scripts/release-entrypoint.sh" namelessmc/php:dev

0 comments on commit b051fb8

Please sign in to comment.