@pob/root 7.5.0 → 7.6.1

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.6.1](https://github.com/christophehurpeau/pob/compare/@pob/root@7.6.0...@pob/root@7.6.1) (2023-03-19)
7
+
8
+ **Note:** Version bump only for package @pob/root
9
+
10
+
11
+
12
+
13
+
14
+ ## [7.6.0](https://github.com/christophehurpeau/pob/compare/@pob/root@7.5.0...@pob/root@7.6.0) (2023-03-19)
15
+
16
+
17
+ ### Features
18
+
19
+ * **root:** update-pre-push-hook-to-avoid-running-when-deleting-branches ([#1572](https://github.com/christophehurpeau/pob/issues/1572)) ([f9985f5](https://github.com/christophehurpeau/pob/commit/f9985f5085888e7424e1ee1d598db8881283f7ac))
20
+
21
+
22
+
6
23
  ## [7.5.0](https://github.com/christophehurpeau/pob/compare/@pob/root@7.4.0...@pob/root@7.5.0) (2023-03-13)
7
24
 
8
25
 
@@ -106,7 +106,24 @@ fi`;
106
106
  }
107
107
 
108
108
  if (prePushHook.length > 0) {
109
- writeHook('pre-push', prePushHook.join(' && '));
109
+ writeHook(
110
+ 'pre-push',
111
+ `
112
+ # z40 is the value matching the empty blob/commit/tree SHA (zero x 40)
113
+ z40=0000000000000000000000000000000000000000
114
+ branch_ref=$(git symbolic-ref HEAD)
115
+
116
+ while read local_ref local_sha remote_ref remote_sha
117
+ do
118
+ # Skip if branch deletion
119
+ if [ "$local_sha" != "$z40" ]; then
120
+ if [ "$local_ref" = "$branch_ref" ]; then
121
+ ${prePushHook.join(' && ')}
122
+ fi
123
+ fi
124
+ done
125
+ `,
126
+ );
110
127
  } else {
111
128
  ensureHookDeleted('pre-push');
112
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/root",
3
- "version": "7.5.0",
3
+ "version": "7.6.1",
4
4
  "description": "root package",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
@@ -50,16 +50,16 @@
50
50
  "dependencies": {
51
51
  "@commitlint/cli": "17.4.4",
52
52
  "@pob/pretty-eslint-config": "4.1.1",
53
- "@pob/pretty-pkg": "5.1.1",
53
+ "@pob/pretty-pkg": "5.1.2",
54
54
  "conventional-changelog-conventionalcommits": "^5.0.0",
55
55
  "husky": "~8.0.1",
56
56
  "json5": "^2.2.2",
57
57
  "lint-staged": "13.2.0",
58
- "pob-dependencies": "7.5.0",
58
+ "pob-dependencies": "7.6.1",
59
59
  "prettier": "2.8.4",
60
60
  "repository-check-dirty": "5.1.1",
61
61
  "semver": "^7.3.7",
62
62
  "which-pm-runs": "1.1.0"
63
63
  },
64
- "gitHead": "760271a7f86157af842aba3d3383c97605532097"
64
+ "gitHead": "831fbb0a3e31c5f4654f8930df6e5de3d07ac90a"
65
65
  }