Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow running release script without TTY #3200

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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