From 21acc064aa9b116a3888b9363660fd017071ccec Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 29 Jan 2022 22:07:13 +0000 Subject: [PATCH] feat: Make git-submit work without argument. --- .cirrus.yml | 3 +-- .github/settings.yml | 3 +-- .github/workflows/publish.yml | 2 ++ BUILD.bazel | 2 ++ tools/git-submit | 5 +++-- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ef32e2d..abddecd 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,5 +1,5 @@ --- -bazel-release_task: +bazel-opt_task: container: image: toxchat/toktok-stack:0.0.31-release cpu: 2 @@ -9,5 +9,4 @@ bazel-release_task: test_all_script: - cd /src/workspace && bazel test -k --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST - --config=release //hs-github-tools/... diff --git a/.github/settings.yml b/.github/settings.yml index 8c0f7f5..4c3ed25 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -12,7 +12,6 @@ branches: protection: required_status_checks: contexts: - - "bazel-release" + - "bazel-opt" - "build / cabal" - "build / stack" - - "code-review/reviewable" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b37fa83..2502618 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,3 +9,5 @@ on: jobs: publish: uses: TokTok/ci-tools/.github/workflows/haskell-publish.yml@master + secrets: + API_TOKEN_HACKAGE: ${{ secrets.API_TOKEN_HACKAGE }} diff --git a/BUILD.bazel b/BUILD.bazel index 112bd66..a00ddde 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -3,6 +3,8 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library") load("//third_party/haskell/hspec-discover:build_defs.bzl", "hspec_test") load("//tools/project:build_defs.bzl", "project") +package(features = ["-layering_check"]) + project() haskell_library( diff --git a/tools/git-submit b/tools/git-submit index c73db78..a99296a 100755 --- a/tools/git-submit +++ b/tools/git-submit @@ -8,12 +8,13 @@ BRANCH="${1-$(git rev-parse --abbrev-ref HEAD)}" if (echo "$BRANCH" | grep ':' >/dev/null); then REMOTE="$(echo "$BRANCH" | grep -o '^[^:]*')" BRANCH="$(echo "$BRANCH" | grep -o '[^:]*$')" - REMOTE="$(git remote -v | grep ":$REMOTE/.* (push)" | grep -o '^\S*')" + REMOTE="$(git remote -v | grep -i ":$REMOTE/.* (push)" | grep -o '^\S*')" fi if [ -n "$REMOTE" ] && ! (git branch | grep "^..$BRANCH\$" >/dev/null); then git checkout --track "$REMOTE/$BRANCH" else + REMOTE=origin git checkout "$BRANCH" fi @@ -21,4 +22,4 @@ git push upstream "$BRANCH:master" git sync git branch -d "$BRANCH" sleep 2 -git push origin ":$BRANCH" +git push "$REMOTE" ":$BRANCH"