Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

outputs = { self, nixpkgs, flake-utils }:
let
ghcVer = "ghc96";
ghcVer = "ghc910";
makeHaskellOverlay = overlay: final: prev: {
haskell = prev.haskell // {
packages = prev.haskell.packages // {
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: string-variants
version: 0.3.1.1
version: 0.3.1.3
synopsis: Constrained text newtypes
description: See README at <https://github.com/MercuryTechnologies/string-variants#readme>.
category: Data
Expand Down
37 changes: 37 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -xeu

cabal_files=(*.cabal)
if [[ ${#cabal_files[@]} != 1 ]]; then
echo "Error: non-1 number of cabal_file"
exit 1
fi
cabal_file=${cabal_files[0]}
package_name=${cabal_file//.cabal}

if [[ -e package.yaml ]]; then
hpack --force
fi

version=$(perl -ne '/^version: (.+)$/ && print "$1\n"' "${cabal_file}")
git fetch origin

# Ensure we are on origin/main
[[ $(git rev-parse origin/HEAD) == $(git rev-parse HEAD) ]] || (echo "not up to date"; exit 1)

# Verify Nix
nix flake check -Lv

cabal sdist

sdist="dist-newstyle/sdist/$package_name-${version}.tar.gz"
tar tf "$sdist"

echo -e "\n\nWould you like to release this sdist as $version? Enter the version number if so."
read resp

[[ "$resp" == "$version" ]]

cabal upload "$sdist"
git tag -a -m "Version ${version}" "v${version}"
git push origin "v${version}"
2 changes: 1 addition & 1 deletion string-variants.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.36.1.
-- This file has been generated from package.yaml by hpack version 0.38.2.
--
-- see: https://github.com/sol/hpack

Expand Down
Loading