diff --git a/.travis.yml b/.travis.yml index a03c3fe7..12392da4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,8 @@ deploy: provider: releases file_glob: true file: - - output/final/*.tar.xz - - fyne-cross/bin/*.tar.xz + - output/final/*.tar.gz + - fyne-cross/bin/*.tar.gz draft: true prerelease: true skip_cleanup: true diff --git a/build-skyimager.sh b/build-skyimager.sh index 6245b450..e5f2a271 100755 --- a/build-skyimager.sh +++ b/build-skyimager.sh @@ -25,8 +25,7 @@ TARGETS=("linux-amd64" "darwin-amd64" "windows-amd64") for target in "${TARGETS[@]}"; do cd "$FYNE" || exit 1 dst="./skyimager-$target-$VERSION" - tar -czf "$dst.tar" "$target"/* || exit 1 - xz -vzT0 "$dst.tar" || exit 1 + tar -czf "$dst.tar.gz" "$target"/* || exit 1 done cd "$(pwd)" || 0 diff --git a/build.sh b/build.sh index e7087b62..45faa775 100755 --- a/build.sh +++ b/build.sh @@ -414,8 +414,7 @@ calc_sums_compress() # compress info "Compressing, this will take a while..." name=$(echo "${img}" | rev | cut -d '.' -f 2- | rev) - tar -cvf "${name}.tar" "${img}"* - xz -vzT0 "${name}.tar" + tar -cvzf "${name}.tar.gz" "${img}"* done cd "${ROOT}" || return 1 @@ -442,7 +441,7 @@ clean_output_dir() # Clean parts. cd "${PARTS_ARMBIAN_DIR}" && find . -type f ! -name '*.7z' -delete cd "${PARTS_SKYWIRE_DIR}" && find . -type f ! -name '*.tar.gz' -delete && rm -rf bin - cd "${FINAL_IMG_DIR}" && find . -type f ! -name '*.tar.xz' -delete + cd "${FINAL_IMG_DIR}" && find . -type f ! -name '*.tar.gz' -delete # Rm base image. rm -v "${IMAGE_DIR}/base_image" diff --git a/pkg/imager/builder.go b/pkg/imager/builder.go index b34a6fee..86060257 100644 --- a/pkg/imager/builder.go +++ b/pkg/imager/builder.go @@ -20,7 +20,7 @@ import ( // File extensions which we expect to see in the archive. const ( ExtTmp = ".tmp" - ExtTarXz = ".tar.xz" + ExtTarGz = ".tar.gz" ExtImg = ".img" ExtMD5 = ".img.md5" ExtSHA1 = ".img.sha1" @@ -71,7 +71,7 @@ func NewBuilder(log logrus.FieldLogger, root string) (*Builder, error) { // DownloadPath returns the path to the download file. func (b *Builder) DownloadPath() string { - return filepath.Join(b.baseDir, "download"+ExtTarXz) + return filepath.Join(b.baseDir, "download"+ExtTarGz) } // DownloadTotal is a thread-safe function that returns the total download size. @@ -103,15 +103,15 @@ func (b *Builder) ExtractArchive() (err error) { pkgFile := b.DownloadPath() log.WithField("archive_file", pkgFile).Info("Extracting...") - tarXz := archiver.NewTarXz() + tarGz := archiver.NewTarGz() defer func() { - if err := tarXz.Close(); err != nil { + if err := tarGz.Close(); err != nil { log.WithError(err).Error("Failed to close archiver.") } }() walkFn := func(f archiver.File) error { - if _, ok := hasExtension(f.Name(), ExtTarXz); ok || f.IsDir() { + if _, ok := hasExtension(f.Name(), ExtTarGz); ok || f.IsDir() { log.WithField("file_name", f.Name()). Debug("Skipping...") return nil @@ -160,7 +160,7 @@ func (b *Builder) ExtractArchive() (err error) { return nil } - if err = tarXz.Walk(pkgFile, walkFn); err != nil { + if err = tarGz.Walk(pkgFile, walkFn); err != nil { return err } diff --git a/pkg/imager/latest_release.go b/pkg/imager/latest_release.go index 3724bfdf..48bbeb97 100644 --- a/pkg/imager/latest_release.go +++ b/pkg/imager/latest_release.go @@ -18,7 +18,7 @@ const ( ) func expectedBaseImgAssetName(tag string) string { - return fmt.Sprintf("Skybian-%s%s", tag, ExtTarXz) + return fmt.Sprintf("Skybian-%s%s", tag, ExtTarGz) } // LatestBaseImgURL returns the latest stable base image download URL.