Skip to content

arm64 Mac download needed #176

Open
Open

Description

@ryandesign

At https://github.com/ericchiang/pup/releases/tag/v0.4.0 there are downloads for i386 and x86_64 Macs but not arm64 Macs.

Activity

  1. watbulb commented on May 16, 2022

    @watbulb

    arm64 builds are available on brew. using it currently on M1

  2. marcastel commented on Dec 28, 2023

    @marcastel

    Hi. Came across the same issue and DID NOT want to use Homebrew. Here is my workaround... somewhat overkill as it can be used to rebuild all targets. I only used the darmin/arm64 output as this was my requirement; other targets have not been tested.

    #! /bin/ksh
    typeset version="0.4.0"
    
    # Download the master repository (or the release tarball as desired)
    git clone https://github.com/ericchiang/pup pup-$version
    cd pup-$version
    
    [[ -d dist ]] && rm -rf dist; mkdir dist
    
    # Get all dependencies
    for dependency in \
        github.com/{fatih/color,mattn/go-colorable} \
        golang.org/x/{net/{html,html/atom,html/charset},text/transform}
    do GO111MODULE=auto go get $dependency; done
    
    # List all platforms (exception list taken from release.sh)
    go tool dist list | sed '/android|darwin\/arm|s390x|plan9\/arm/d; s/\// /' |\
    while read os arch; do
    
        # Construct the target binary's name
        typeset binary=pup; [[ $os == windows ]] && binary+=.exe
        typeset arname=pup-$version-$os-$arch
    
        [[ $os == @(darwin|linux) && $arch == @(arm|amd)64 ]] || continue
    
        print -- "- building for operating system\`$os\` running on a \`$arch\` architecture"
        #go -- build -v -a -o dist/$binary github.com/ericchiang/pup &&
        GO111MODULE=auto GOOS=$os GOOARC=$arch CGO_ENABLED=0 \
        go build -v -a -o dist/$binary 1>&2 2>dist/$arname.log &&
        (cd dist; tar zcf $arname.tgz $binary && rm $binary)
    
    done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions