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

Add alternate io class #2177

Closed
wants to merge 8 commits into from
Closed
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
102 changes: 102 additions & 0 deletions .github/workflows/exe-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Exe Release

on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+_cio'
branches:
- 'commandio'

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
if: runner.os != 'Windows'
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get Docker version
id: docker-version
run: |
echo "version=$(python scripts/docker_version.py)" >> $GITHUB_OUTPUT
shell: bash

- name: Check if Docker image exists
id: check-image
run: |
if docker manifest inspect ghcr.io/${{ github.repository }}/builder:${{ steps.docker-version.outputs.version }}-${{ runner.os }} > /dev/null 2>&1; then
echo "image_exists=true" >> $GITHUB_OUTPUT
else
echo "image_exists=false" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Build and push Docker image (non-Windows)
if: steps.check-image.outputs.image_exists != 'true' && runner.os != 'Windows'
uses: docker/build-push-action@v5
with:
context: .
file: scripts/Dockerfile.linux.cio
push: true
tags: ghcr.io/${{ github.repository }}/builder:${{ steps.docker-version.outputs.version }}-${{ runner.os }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push Docker image (Windows)
if: steps.check-image.outputs.image_exists != 'true' && runner.os == 'Windows'
shell: bash
run: |
docker build -t ghcr.io/${{ github.repository }}/builder:${{ steps.docker-version.outputs.version }}-${{ runner.os }} -f scripts/Dockerfile.windows.cio .
docker push ghcr.io/${{ github.repository }}/builder:${{ steps.docker-version.outputs.version }}-${{ runner.os }}

- name: Build Release
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
DOCKERFILE="scripts/Dockerfile.windows.cio"
else
DOCKERFILE="scripts/Dockerfile.cio"
fi
docker run --rm \
-v ${{ github.workspace }}:/repo \
-v ${{ github.workspace }}/dist:/repo/dist \
ghcr.io/${{ github.repository }}/builder:${{ steps.docker-version.outputs.version }}-${{ runner.os }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: release-${{ runner.os }}
path: dist/*

create-release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
generate_release_notes: true
3 changes: 0 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: PyPI Release

on:
workflow_dispatch:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build_and_publish:
Expand Down
6 changes: 6 additions & 0 deletions aider/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,12 @@ def get_parser(default_config_files, git_root):
" or home directory)"
),
)
group.add_argument(
"--commandio",
action="store_true",
help="Run aider using commands via stdin/stdout",
default=False,
)
# This is a duplicate of the argument in the preparser and is a no-op by this time of
# argument parsing, but it's here so that the help is displayed as expected.
group.add_argument(
Expand Down
Loading
Loading