Skip to content

Commit

Permalink
Merge pull request #6 from telostat/get-ready-for-release
Browse files Browse the repository at this point in the history
Get Ready for Release
  • Loading branch information
vst authored Jul 18, 2022
2 parents 3615dfb + 9ed68dc commit d8099bf
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 16 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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 <NEXT-TAG>
git checkout develop
git rebase main
git push
```
24 changes: 9 additions & 15 deletions deback.cabal
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/telostat/deback#readme>
homepage: https://github.com/telostat/deback#readme
bug-reports: https://github.com/telostat/deback/issues
author: Vehbi Sinan Tunalioglu
maintainer: [email protected]
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
Expand Down
14 changes: 13 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ pkgs.mkShell {
pkgs.lolcat

## Release stuff:
pkgs.busybox
pkgs.gh
pkgs.git
pkgs.git-chglog
pkgs.upx

## Haskell stuff:
ghc
Expand Down

0 comments on commit d8099bf

Please sign in to comment.