Skip to content

Optimize Step3: Clone Autoloop and Copy Files for install.md #32

Description

@bmerkle

Here is a possible portability optimization for the installation of autoloop

in https://github.com/githubnext/autoloop/blob/main/install.md
Step 3: Clone Autoloop and Copy Files

instead of the git and bash commands which only work on Linux and mac (and not windows), we could use a version that avoids git (because we do not need the git info) and then have a ready to run script for windows (Powershell) and linux and mac (bash or sh script)

For Windows (PowerShell)

# Download and Extract (Direct Export)
Invoke-WebRequest -Uri "https://github.com/githubnext/autoloop/archive/refs/heads/main.zip" -OutFile "autoloop.zip"
Expand-Archive -Path "autoloop.zip" -DestinationPath "temp_autoloop"

# Create Directories
New-Item -ItemType Directory -Force -Path ".github/workflows", ".github/ISSUE_TEMPLATE", ".autoloop/programs"

# Copy Files
Copy-Item -Path "temp_autoloop/autoloop-main/workflows/*" -Destination ".github/workflows/" -Recurse -Force
Copy-Item -Path "temp_autoloop/autoloop-main/.github/ISSUE_TEMPLATE/*" -Destination ".github/ISSUE_TEMPLATE/" -Recurse -Force

# Clean up
Remove-Item -Path "autoloop.zip", "temp_autoloop" -Recurse -Force

For Linux & macOS (Bash/Zsh)

# Download and Extract (Direct Export)
curl -L https://github.com/githubnext/autoloop/archive/refs/heads/main.zip -o autoloop.zip
unzip autoloop.zip -d temp_autoloop

# Create Directories
mkdir -p .github/workflows .github/ISSUE_TEMPLATE .autoloop/programs

# Copy Files (Note: the folder inside the zip is usually 'repo-name-main')
cp -r temp_autoloop/autoloop-main/workflows/* .github/workflows/
cp -r temp_autoloop/autoloop-main/.github/ISSUE_TEMPLATE/* .github/ISSUE_TEMPLATE/

# Clean up
rm -rf autoloop.zip temp_autoloop

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions