mirror of
https://github.com/majd/ipatool
synced 2026-12-05 13:29:03 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2cb7c653e | ||
|
|
2f154ad4f9 |
No files matched your search
@@ -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
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user