-
Notifications
You must be signed in to change notification settings - Fork 10
Fix linux path for flutter and add xz extractor #190
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
Changes from 1 commit
aa33063
842b7cb
8f52a24
c7420e4
95e200a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ import ( | |
|
|
||
| // ExtensionConfig defines the file extension based on OS | ||
| type ExtensionConfig struct { | ||
| Linux string `yaml:"linux"` | ||
| Windows string `yaml:"windows"` | ||
| Default string `yaml:"default"` | ||
| } | ||
|
|
@@ -80,6 +81,9 @@ func GetExtension(extension ExtensionConfig, goos string) string { | |
| if goos == "windows" { | ||
| return extension.Windows | ||
| } | ||
| if goos == "linux" { | ||
| return extension.Linux | ||
| } | ||
|
||
| return extension.Default | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,8 +14,16 @@ | |
| ) | ||
|
|
||
| func ExtractTarGz(archive *os.File, targetDir string) error { | ||
| return ExtractTar(archive, targetDir, archiver.Gz{}) | ||
| } | ||
|
|
||
| func ExtractTarXz(archive *os.File, targetDir string) error { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: exported function ExtractTarXz should have comment or be unexported |
||
| return ExtractTar(archive, targetDir, archiver.Xz{}) | ||
| } | ||
|
|
||
| func ExtractTar(archive *os.File, targetDir string, compression archiver.Compression) error { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codacy found an issue: exported function ExtractTar should have comment or be unexported |
||
| format := archiver.CompressedArchive{ | ||
| Compression: archiver.Gz{}, | ||
| Compression: compression, | ||
| Archival: archiver.Tar{}, | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a spelling error in the description. 'Flutterruntime' should be 'Flutter runtime' (with a space).