diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..50f8547 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2022 Telostat Pte Ltd + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 328f6ee..45f9bfc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,14 @@ # deback +![GitHub release (latest by date)](https://img.shields.io/github/v/release/telostat/deback) +![GitHub contributors](https://img.shields.io/github/contributors/telostat/deback) +![GitHub](https://img.shields.io/github/license/telostat/deback) + +> **Note:** This software is under development and of prototype quality at the +> moment. Expect significant breaking changes without notification until we +> reach the first minor version. Until then, we will keep bumping the patch +> version. + Backups are hard, but we need to do it right for business continuity and sanity. @@ -99,3 +108,19 @@ nix-env -f default.nix -i ```sh nix-env -f https://github.com/telostat/deback/archive/main.tar.gz -i ``` + +## Releasing + +Here is the release process: + +```sh +git checkout develop +git pull +git checkout main +git pull +git merge --no-ff develop +bash release.sh -n +git checkout develop +git rebase main +git push +``` diff --git a/deback.cabal b/deback.cabal index d02c18c..b0d61cf 100644 --- a/deback.cabal +++ b/deback.cabal @@ -1,24 +1,18 @@ cabal-version: 2.4 name: deback version: 0.0.2 - --- A short (one-line) description of the package. --- synopsis: - --- A longer description of the package. --- description: - --- A URL where users can report bugs. --- bug-reports: - --- The license under which the package is released. --- license: +synopsis: An opinionated backup and archive tool +description: Please see the README on GitHub at +homepage: https://github.com/telostat/deback#readme +bug-reports: https://github.com/telostat/deback/issues author: Vehbi Sinan Tunalioglu maintainer: vst@vsthost.com +copyright: 2022 Teloscube Pte Ltd +license: MIT +license-file: LICENSE +category: System, Backup +build-type: Simple --- A copyright notice. --- copyright: --- category: extra-source-files: CHANGELOG.md README.md diff --git a/release.sh b/release.sh index 471f8ef..f19b897 100644 --- a/release.sh +++ b/release.sh @@ -49,6 +49,18 @@ git push --follow-tags origin main ## Build application: nix-build --arg doStatic true +## Get compiled output file path: +_infile="result/bin/deback" + +## Get compressed, renamed output file path: +_outfile="deback-v${_VERSION_NEXT}-$(uname -s)-$(uname -m)-static" + +## Compress file: +upx -o "${_outfile}" "${_infile}" + ## Release gh release create "v${_VERSION_NEXT}" --generate-notes -gh release upload "v${_VERSION_NEXT}" result/bin/deback +gh release upload "v${_VERSION_NEXT}" "${_outfile}" + +## Remove outfile: +rm "${_outfile}" diff --git a/shell.nix b/shell.nix index 95ffdec..875c3c3 100644 --- a/shell.nix +++ b/shell.nix @@ -31,9 +31,11 @@ pkgs.mkShell { pkgs.lolcat ## Release stuff: + pkgs.busybox pkgs.gh pkgs.git pkgs.git-chglog + pkgs.upx ## Haskell stuff: ghc