anchor.diff:              --replace nightly \
               "postgrest-nightly-$suffix-linux-x64-static.tar.xz"
           else
  -          changes="$(sed -n "1,/$version/d;/## \[/q;p" ${../../CHANGELOG.md})"
  +          changes="$(sed -n "1,/$_arg_version/d;/## \[/q;p" ${../../CHANGELOG.md})"
   
  -          tar cvJf "postgrest-$version-linux-x64-static.tar.xz" \
  +          tar cvJf "postgrest-$_arg_version-linux-x64-static.tar.xz" \
               -C ${postgrest}/bin postgrest
   
             ${ghr}/bin/ghr \
  
positive.code:       {
          name = "postgrest-release-dockerhub";
          docs = "Push a new release to Docker Hub";
        }
        ''
          version=$1
  
          docker load -i ${docker.image}
  
          if test "$version" = "nightly"
          then
            suffix=$(git show -s --format="%cd-%h" --date="format:%Y-%m-%d-%H-%M")
  
            docker tag postgrest:latest "$DOCKER_REPO/postgrest:nightly-$suffix"
            docker push "$DOCKER_REPO/postgrest:nightly-$suffix"
          else
            docker tag postgrest:latest "$DOCKER_REPO"/postgrest:latest
            docker tag postgrest:latest "$DOCKER_REPO/postgrest:$version"
  
            docker push "$DOCKER_REPO"/postgrest:latest
            docker push "$DOCKER_REPO/postgrest:$version"
          fi
        '';
  
  
negative.code:       {
          name = "postgrest-release-github";
          docs = "Push a new release to GitHub.";
          args = [
            "ARG_POSITIONAL_SINGLE([version], [git version tag to make release for])"
            "ARG_USE_ENV([GITHUB_TOKEN], [], [GitHub token])"
            "ARG_USE_ENV([GITHUB_USERNAME], [], [GitHub user name])"
            "ARG_USE_ENV([GITHUB_REPONAME], [], [GitHub repository name])"
          ];
          inRootDir = true;
        }
        ''
          # ARG_USE_ENV only adds defaults or docs for environment variables
          # We manually implement a required check here
          # See also: https://github.com/matejak/argbash/issues/80
          GITHUB_TOKEN="''${GITHUB_TOKEN:?GITHUB_TOKEN is required}"
          GITHUB_USERNAME="''${GITHUB_USERNAME:?GITHUB_USERNAME is required}"
          GITHUB_REPONAME="''${GITHUB_REPONAME:?GITHUB_REPONAME is required}"
  
          if test "$_arg_version" = "nightly"
          then
            suffix=$(${git}/bin/git show -s --format="%cd-%h" --date="format:%Y-%m-%d-%H-%M")
            tar cvJf "postgrest-nightly-$suffix-linux-x64-static.tar.xz" \
              -C ${postgrest}/bin postgrest
  
  