gotsha 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b545ae6785a2b5315dabee560bc0cbb4fd7b158c12cd170f3e745997f5ad34a2
4
- data.tar.gz: e77dae022f8deb64bf69898e96e0b11f96ab7e07a1547753fff22a7d81beea65
3
+ metadata.gz: 3e0f73be2106c8fd2111cf3e47162d1937dc90f518de9937ae9c520f9326024a
4
+ data.tar.gz: b3f3bf5f2b1f80e2ade8fe795b6ce1df454d1b0262ed00f991d16810378469a8
5
5
  SHA512:
6
- metadata.gz: 2b54c38fb51f04609aaa0d974c6feb20bf8f1ea7c89155ba5ee0168afb647e7b9de8498fdcb370bb038fa414a21e78d17ed9bc61664c832ba4a38dbf986940d9
7
- data.tar.gz: fdfee8a01725b7f2b2ddca40636f2a5b29466c9196dcf0449ab2e0264eb67321f3a5ff0c53d0795edc92cf82d63722c222dad8fe512b3323f98b2f1cfaddbf80
6
+ metadata.gz: b1b39081004be11a4b7569e54c42bb346e367b24d64f1603982c9a985b4502a014d0f546d3f158b1d1e9c6012da7a63c3f15e807452a7e9d68f4c969a51f8eaf
7
+ data.tar.gz: 0ab6697d6d78ec97fcbd69c1241ab8c3ae9f01184f8fcb27cf169a4a0f1f43faa4fb5403f543c8825f02efc4051c6479857b5e4dc62d2fcd6e0ec44a540b6dd9
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- grep -qE 'post_commit_tests\s*=\s*true' .gotsha/config.toml || exit 0
4
+ grep -qE '^[^#]*post_commit_tests\s*=\s*true' .gotsha/config.toml || exit 0
5
5
 
6
6
  exe/gotsha test
7
7
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- grep -qE 'pre_push_tests\s*=\s*true' .gotsha/config.toml && (exe/gotsha status || exe/gotsha test)
4
+ grep -qE '^[^#]*pre_push_tests\s*=\s*true' .gotsha/config.toml && (exe/gotsha status || exe/gotsha test)
5
5
  exe/gotsha push
data/CHANGELOG.md CHANGED
@@ -1,7 +1,16 @@
1
+ ## [1.2.2] - 2026-01-03
2
+
3
+ - Fix a bug: hooks did not ignore commented-out settings from config file. They do now.
4
+
5
+ ## [1.2.1] - 2025-10-30
6
+
7
+ - Enhance pre-generated Github Action and GitLab CI configs
8
+ - Always force push Git notes (clear history is not an objective here; we just need a reliable way for the most recent commit notes to get there every time, and since we also use force in fetching, this is an OK approach)
9
+
1
10
  ## [1.2.0] - 2025-10-26
2
11
 
3
- - Support `gotsha version` (and `-v` and `--version`)
4
- - `gotsha --help` is not supported too
12
+ - Add `gotsha version` (and support `-v` and `--version`)
13
+ - `gotsha --help` is now supported too
5
14
  - Relax the required TOML version (it does not matter that much here, and some people reported they had issues with the 3 version required)
6
15
  - Remove a leftover old GH action example
7
16
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <a href="https://rubygems.org/gems/gotsha"><img src="https://badge.fury.io/rb/gotsha.svg?icon=si%3Arubygems&refresh=1" /></a>
1
+ <a href="https://rubygems.org/gems/gotsha"><img src="https://badge.fury.io/rb/gotsha.svg?icon=si%3Arubygems&refresh=2" /></a>
2
2
  # Gotsha — your local testing CI
3
3
  Pushing untested commits? Gotsha!
4
4
 
@@ -6,23 +6,12 @@ module Gotsha
6
6
  DESCRIPTION = "pushes Gotsha test results to remote"
7
7
 
8
8
  def call
9
- try_push = push_command
9
+ command = BashCommand.silent_run!("git push --no-verify --force origin refs/notes/gotsha:refs/notes/gotsha")
10
10
 
11
- unless try_push.success?
12
- puts "First push detected, need to run tests one more time..."
13
- Fetch.new.call
14
- Test.new.call
15
- push_command
16
- end
11
+ raise(Errors::HardFail, "something went wrong") unless command.success?
17
12
 
18
13
  "pushed"
19
14
  end
20
-
21
- private
22
-
23
- def push_command
24
- BashCommand.silent_run!("git push --no-verify origin refs/notes/gotsha:refs/notes/gotsha")
25
- end
26
15
  end
27
16
  end
28
17
  end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- grep -qE 'post_commit_tests\s*=\s*true' .gotsha/config.toml || exit 0
4
+ grep -qE '^[^#]*post_commit_tests\s*=\s*true' .gotsha/config.toml || exit 0
5
5
 
6
6
  gotsha test
7
7
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- grep -qE 'pre_push_tests\s*=\s*true' .gotsha/config.toml && (gotsha status || gotsha test)
4
+ grep -qE '^[^#]*pre_push_tests\s*=\s*true' .gotsha/config.toml && (gotsha status || gotsha test)
5
5
  gotsha push
@@ -2,11 +2,13 @@ name: Gotsha
2
2
 
3
3
  on:
4
4
  pull_request:
5
- # Uncomment line below to run Gotsha only when asking for review (ie. do not run when PR is draft)
6
- # types: [ready_for_review]
5
+ types: [opened, ready_for_review, synchronize]
7
6
 
8
7
  jobs:
9
8
  verify:
9
+ # Uncomment line below to run Gotsha only after asking for review (ie. do not run when PR is draft)
10
+ #if: github.event.action == 'ready_for_review' || (github.event.action == 'synchronize' && !github.event.pull_request.draft)
11
+
10
12
  runs-on: ubuntu-latest
11
13
  steps:
12
14
  - uses: actions/checkout@v4
@@ -1,6 +1,6 @@
1
1
  # Start using Gotsha in GitLab by renaming this file to `.gitlab-ci.yml`.
2
2
  #
3
- # If it already exists, append this to its end:
3
+ # If that file already exists, append this to its end instead of any renaming:
4
4
  #
5
5
  #include:
6
6
  # - local: '.gitlab-ci.gotsha.yml'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gotsha
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.2"
5
5
  end
data/web/index.html CHANGED
@@ -162,7 +162,7 @@ gotsha configure <span style="color: gray;"># this will open the config file; it
162
162
 
163
163
 
164
164
  <p class="foot">
165
- © <span id="y"></span> <a target="_blank" href="https://x.com/melounvitek">Vítek Meloun</a> (<a target="_blank" href="mailto:vitek@meloun.info">vitek@meloun.info</a>)
165
+ © <span id="y"></span> <a target="_blank" href="https://www.w10.cz">Vítek Meloun</a>
166
166
  <script type="text/javascript" src="https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js" data-name="bmc-button" data-slug="gotsha" data-color="#FFDD00" data-emoji="" data-font="Cookie" data-text="Buy me a coffee" data-outline-color="#000000" data-font-color="#000000" data-coffee-color="#ffffff" ></script>
167
167
  </p>
168
168
  </main>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotsha
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitek Meloun