From 9726de49670ecb53d02d5eb9218e62324e15c821 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 2 Dec 2020 14:55:37 -0700 Subject: [PATCH] add _examples --- _examples/built-with-goreleaser/README.md | 38 +++++++++++++++++++++++ _examples/built-with-goreleaser/arc | 1 + _examples/built-with-goreleaser/keypairs | 1 + _examples/compressed-with-xz/README.md | 24 ++++++++++++++ _examples/compressed-with-xz/gitea | 1 + 5 files changed, 65 insertions(+) create mode 100644 _examples/built-with-goreleaser/README.md create mode 100644 _examples/built-with-goreleaser/arc create mode 100644 _examples/built-with-goreleaser/keypairs create mode 100644 _examples/compressed-with-xz/README.md create mode 100644 _examples/compressed-with-xz/gitea diff --git a/_examples/built-with-goreleaser/README.md b/_examples/built-with-goreleaser/README.md new file mode 100644 index 0000000..076c56f --- /dev/null +++ b/_examples/built-with-goreleaser/README.md @@ -0,0 +1,38 @@ +# Building with GoReleaser? + +And publishing with Git Releases? + +If so, you can copy one of the given examples, do a little find-and-replace, and +viola, you've got your Webi installer! + +Each example has four files that need to be modified, just slightly: + +- install.sh +- install.ps1 +- releases.js +- README.md + +## Releases with .tag.gz and .zip + +See [./keypairs/](/keypairs/) as an example. + +```bash +rsync -av ./keypairs/ ./my-project/ +``` + +Keypairs is packaged for Mac and Linux as `.tar.gz`, and as `.zip` for Windows. + +## Bare Releases (no compression) + +See [./arc/](/arc/) as an example. + +```bash +rsync -av ./arc/ ./my-project/ +``` + +Arc is an unarchive tool and, therefore, makes sense that it is released +unpackaged, without compression. + +Note: `arc` is the installed command name, while `archiver` is the package name. +When you find-and-replace, you'll probably replace both with your command name, +because your command and package probably have the same name. diff --git a/_examples/built-with-goreleaser/arc b/_examples/built-with-goreleaser/arc new file mode 100644 index 0000000..2550b9c --- /dev/null +++ b/_examples/built-with-goreleaser/arc @@ -0,0 +1 @@ +../../arc/ diff --git a/_examples/built-with-goreleaser/keypairs b/_examples/built-with-goreleaser/keypairs new file mode 100644 index 0000000..1f46846 --- /dev/null +++ b/_examples/built-with-goreleaser/keypairs @@ -0,0 +1 @@ +../../keypairs/ diff --git a/_examples/compressed-with-xz/README.md b/_examples/compressed-with-xz/README.md new file mode 100644 index 0000000..5352a85 --- /dev/null +++ b/_examples/compressed-with-xz/README.md @@ -0,0 +1,24 @@ +# Releasing xz-compressed? + +And publishing with Git Releases? + +If so, you can copy one of the given examples, do a little find-and-replace, and +viola, you've got your Webi installer! + +Each example has four files that need to be modified, just slightly: + +- install.sh +- install.ps1 +- releases.js +- README.md + +## Bare Releases (with compression) as `.xz` + +See [./gitea/](/gitea/) as an example. + +```bash +rsync -av ./keypairs/ ./my-project/ +``` + +Gitea is compressed for Mac and Linux as `.xz`, and either bare `.exe` or +`.exe.xz` for Windows. diff --git a/_examples/compressed-with-xz/gitea b/_examples/compressed-with-xz/gitea new file mode 100644 index 0000000..37584ba --- /dev/null +++ b/_examples/compressed-with-xz/gitea @@ -0,0 +1 @@ +../../gitea/ -- 2.25.1