diff --git a/.gitignore b/.gitignore index b19a8c434..b41f4cc5e 100755 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ gui/pyside6/__pycache__/ cloudfuse-logs.txt ui_*.py test/scripts/dirIterate.go -**/logfile.txt \ No newline at end of file +**/logfile.txt +dist/ \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 000000000..8520a1642 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,151 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines bellow are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... + +builds: + - id: windows + goos: + - windows + goarch: + - amd64 + env: + - CGO_ENABLED=0 + flags: + - -trimpath + mod_timestamp: '{{ .CommitTimestamp }}' + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} + + - id: linux-amd64 + goos: + - linux + goarch: + - amd64 + env: + - CGO_ENABLED=1 + flags: + - -trimpath + mod_timestamp: '{{ .CommitTimestamp }}' + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} + + - id: linux-arm64 + goos: + - linux + goarch: + - arm64 + env: + - CGO_ENABLED=1 + - CC=aarch64-linux-gnu-gcc + - CXX=aarch64-linux-gnu-g++ + flags: + - -trimpath + mod_timestamp: '{{ .CommitTimestamp }}' + ldflags: + - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} + +checksum: + name_template: "checksums_sha256.txt" + algorithm: sha256 + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{ .Version }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + files: + - LICENSE + - README.md + - NOTICE + - setup/baseConfig.yaml + - sampleFileCacheConfigAzure.yaml + - sampleFileCacheWithSASConfigAzure.yaml + - sampleFileCacheConfigS3.yaml + - sampleStreamingConfigS3.yaml + - sampleStreamingConfigAzure.yaml + +nfpms: + - id: default + + # Name of the package. + package_name: cloudfuse + + # Build IDs for the builds you want to create NFPM packages for. + # Defaults empty, which means no filtering. + builds: + - linux-amd64 + - linux-arm64 + + vendor: Seagate Technology + homepage: https://github.com/Seagate/cloudfuse + maintainer: https://github.com/Seagate/cloudfuse + description: |- + A FUSE filesystem for interacting with S3 and Azure storage. + license: MIT + + # Formats to be generated. + formats: + - deb + - rpm + + section: default + + # Contents to add to the package. + # GoReleaser will automatically add the binaries. + contents: + # Basic file that applies to all packagers + - src: NOTICE + dst: /usr/share/doc/cloudfuse/NOTICE + + - src: LICENSE + dst: /usr/share/doc/cloudfuse/LICENSE + + - src: setup/baseConfig.yaml + dst: /usr/share/cloudfuse/baseConfig.yaml + + - src: sampleFileCacheConfigAzure.yaml + dst: /usr/share/cloudfuse/sampleFileCacheConfigAzure.yaml + + - src: sampleFileCacheConfigS3.yaml + dst: /usr/share/cloudfuse/sampleFileCacheConfigS3.yaml + + - src: sampleFileCacheWithSASConfigAzure.yaml + dst: /usr/share/cloudfuse/sampleFileCacheWithSASConfigAzure.yaml + + - src: sampleStreamingConfigS3.yaml + dst: /usr/share/cloudfuse/sampleStreamingConfigS3.yaml + + - src: sampleStreamingConfigAzure.yaml + dst: /usr/share/cloudfuse/sampleStreamingConfigAzure.yaml + + overrides: + deb: + dependencies: + - libfuse-dev + + rpm: + dependencies: + - fuse-devel + +metadata: + mod_timestamp: "{{ .CommitTimestamp }}"