Compare commits

...
5 changed files with 15 additions and 3 deletions

No files matched your search

+4 -2
View File
@@ -21,7 +21,9 @@ jobs:
go-version: '1.19.3'
cache: true
- run: ./tools/version.sh
- run: go build -o ipatool-${{ matrix.os }}
- run: go build -o ipatool-${{ matrix.os }}-${{ matrix.arch }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
GOARCH: ${{ matrix.arch }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
+2
View File
@@ -23,6 +23,8 @@ jobs:
- run: go build -o ipatool-${{ matrix.os }}
env:
GOOS: ${{ matrix.os }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
- uses: actions/upload-artifact@v2
with:
name: ipatool-${{ matrix.os }}
+2
View File
@@ -45,6 +45,8 @@ jobs:
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
CGO_CFLAGS: -mmacosx-version-min=10.15
CGO_LDFLAGS: -mmacosx-version-min=10.15
- id: output
run: echo ::set-output name=file::ipatool-${{ needs.get_version.outputs.version }}-${GOOS//darwin/macos}-$GOARCH
env:
+6
View File
@@ -174,6 +174,12 @@ func (a *appstore) downloadFile(dst, sourceURL string) (err error) {
return errors.Wrap(err, ErrOpenFile.Error())
}
defer func() {
if closeErr := file.Close(); closeErr != err && err == nil {
err = closeErr
}
}()
sizeMB := float64(res.ContentLength) / (1 << 20)
a.logger.Verbose().Str("size", fmt.Sprintf("%.2fMB", sizeMB)).Msg("downloading")
+1 -1
View File
@@ -78,7 +78,7 @@ func (c *client[R]) Send(req Request) (Result[R], error) {
}
func (c *client[R]) Do(req *http.Request) (*http.Response, error) {
return c.internalClient.Do(req)
return http.DefaultClient.Do(req)
}
func (*client[R]) NewRequest(method, url string, body io.Reader) (*http.Request, error) {