diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c2e642e..ef89f4d 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -42,7 +42,7 @@ jobs: - name: "Setup Go" uses: actions/setup-go@v5 with: - go-version: stable + go-version-file: go.mod - name: "golangci-lint" if: ${{ !cancelled() }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db851ec..01a7504 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -55,7 +55,7 @@ jobs: - name: "Setup Go" uses: actions/setup-go@v5 with: - go-version: stable + go-version-file: go.mod - name: "GoReleaser" id: go @@ -205,8 +205,8 @@ jobs: uses: re-actors/alls-green@release/v1 with: jobs: ${{ toJSON(needs) }} + allowed-skips: release #allowed-failures: docs, linters - #allowed-skips: non-voting-flaky-job - name: "Cleanup Release" if: ${{ failure() }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7d96c1d..4b5a2a5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,8 +1,3 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com - -# The lines below 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 @@ -14,16 +9,14 @@ dist: dist/client 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 ./... # https://goreleaser.com/customization/builds/go/ builds: - env: - CGO_ENABLED=0 +# https://goreleaser.com/customization/archive/ archives: - formats: [tar.gz] # this name template makes the OS and Arch compatible with the results of `uname`. @@ -39,6 +32,7 @@ archives: - goos: windows formats: [zip] +# https://goreleaser.com/customization/dockers_v2/ dockers_v2: - images: - "ghcr.io/smashedr/{{ .ProjectName }}" @@ -55,13 +49,15 @@ dockers_v2: "org.opencontainers.image.source": "{{ .GitURL }}" disable: "{{ or .IsSnapshot .Prerelease }}" +# https://goreleaser.com/customization/homebrew_formulas/ brews: - repository: owner: cssnr name: homebrew-tap token: "{{ .Env.GITHUB_TOKEN }}" + skip_upload: true directory: Formula - homepage: "https://github.com/smashedr/{{ .ProjectName }}" + homepage: "https://smashedr.github.io/{{ .ProjectName }}" description: "Back UP CLI written in Go" license: "MIT" test: | @@ -70,7 +66,9 @@ brews: View the Documentation: https://smashedr.github.io/bup/ - skip_upload: true +# https://goreleaser.com/customization/release/ +release: + replace_existing_artifacts: true #changelog: # sort: asc @@ -78,6 +76,3 @@ brews: # exclude: # - "^docs:" # - "^test:" - -release: - replace_existing_artifacts: true diff --git a/Taskfile.yml b/Taskfile.yml index 0eb188f..1cc90e4 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -49,6 +49,7 @@ tasks: msg: "Already downloaded to: dist/PathMgr" desc: Download PathMgr cmd: | + mkdir -p dist wget https://github.com/Bill-Stewart/PathMgr/releases/download/v2.0.0/PathMgr-2.0.0.zip -O dist/pathmgr.zip unzip dist/pathmgr.zip -d dist/PathMgr diff --git a/docs/index.md b/docs/index.md index d4205ba..32ab547 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,7 +15,7 @@ icon: lucide/rocket [![GitHub Top Language](https://img.shields.io/github/languages/top/smashedr/bup?logo=devbox)](https://github.com/smashedr/bup?tab=readme-ov-file#readme) [![GitHub Contributors](https://img.shields.io/github/contributors-anon/smashedr/bup?logo=southwestairlines)](https://github.com/smashedr/bup/graphs/contributors) [![GitHub Issues](https://img.shields.io/github/issues/smashedr/bup?logo=codeforces&logoColor=white)](https://github.com/smashedr/bup/issues) -[![GitHub Discussions](https://img.shields.io/github/discussions/smashedr/bup?logo=rocketdotchat&logoColor=white)](https://github.com/smashedr/bup/discussions) +[![GitHub Discussions](https://img.shields.io/github/discussions/smashedr/bup?logo=theconversation&logoColor=white)](https://github.com/smashedr/bup/discussions) [![GitHub Forks](https://img.shields.io/github/forks/smashedr/bup?style=flat&logo=forgejo&logoColor=white)](https://github.com/smashedr/bup/forks) [![GitHub Repo Stars](https://img.shields.io/github/stars/smashedr/bup?style=flat&logo=gleam&logoColor=white)](https://github.com/smashedr/bup/stargazers) [![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=apachespark&logoColor=white&label=org%20stars)](https://cssnr.github.io/) @@ -24,11 +24,11 @@ icon: lucide/rocket Back UP `bup` CLI written in Go. ---8<-- "docs/snippets/install.md" - Creates an archive of the `source` directory and puts it in the `destination` directory in a sub-folder with the `name` of the `source` directory and a timestamped filename. +--8<-- "docs/snippets/install.md" + Remembers your `destination` directory and uses the current directory as `source` by default. Supports directory excludes stored in the config file with the saved destination. @@ -52,9 +52,6 @@ Install. --8<-- "docs/snippets/install.md" -Windows users can download the [Windows Installer.exe](https://github.com/smashedr/bup/releases/latest/download/bup_Windows_Installer.exe). -Alternatively, you can manually [download a release](https://github.com/smashedr/bup/releases). - Usage. - Specify `source` and `destination` diff --git a/docs/snippets/install.md b/docs/snippets/install.md index ae5c3a1..f3f69f8 100644 --- a/docs/snippets/install.md +++ b/docs/snippets/install.md @@ -25,3 +25,6 @@ ```shell go install github.com/smashedr/bup@latest ``` + +Windows users can download the [Windows Installer.exe](https://github.com/smashedr/bup/releases/latest/download/bup_Windows_Installer.exe). +Alternatively, you can manually [download a release](https://github.com/smashedr/bup/releases). diff --git a/installer.iss b/installer.iss index 6ed8e95..797bfed 100644 --- a/installer.iss +++ b/installer.iss @@ -5,6 +5,7 @@ #ifndef MyAppVersion #define MyAppVersion "0.0.1" #endif +#define MyAppFileName "bup" [Setup] AppId={{5A1C755C-43D6-4445-BFC9-ABF23CEEF33E} @@ -25,7 +26,7 @@ DisableFinishedPage=yes InfoBeforeFile=assets\pre-install.rtf InfoAfterFile=assets\post-install.rtf -OutputBaseFilename=bup_Windows_Installer +OutputBaseFilename={#MyAppFileName}_Windows_Installer OutputDir=out PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog @@ -45,9 +46,9 @@ Name: "english"; MessagesFile: "compiler:Default.isl" [Files] Source: "dist\PathMgr\i386\PathMgr.dll"; DestDir: "{app}"; Flags: uninsneveruninstall -Source: "dist\client\bup_windows_386_sse2\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode() -Source: "dist\client\bup_windows_amd64_v1\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode() and not IsArm64() -Source: "dist\client\bup_windows_arm64_v8.0\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: IsArm64() +Source: "dist\client\{#MyAppFileName}_windows_386_sse2\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode() +Source: "dist\client\{#MyAppFileName}_windows_amd64_v1\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode() and not IsArm64() +Source: "dist\client\{#MyAppFileName}_windows_arm64_v8.0\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; Check: IsArm64() [Icons] Name: "{group}\{#MyAppName} Folder"; Filename: "{app}"