Skip to content

Commit 85e00d0

Browse files
fix: enable shopt -s globstar (#279)
so we can use the **/ glob to git add/commit Cargo.* files
1 parent 124566f commit 85e00d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/set-git-branch-main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -81613,11 +81613,11 @@ async function main(input) {
8161381613
for (const path of cargoPaths) {
8161481614
await _cargo__WEBPACK_IMPORTED_MODULE_4__/* .setGitBranch */ .B0(path, input.depsRegExp, input.depsGitUrl, input.depsBranch);
8161581615
if ((0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git diff", { cwd: repo, check: false })) {
81616-
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git add **/Cargo.toml*`, { cwd: repo });
81616+
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`shopt -s globstar; git add **/Cargo.toml*`, { cwd: repo });
8161781617
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`git commit --message 'chore: Update git/branch ${path}'`, { cwd: repo, env: _config__WEBPACK_IMPORTED_MODULE_5__/* .gitEnv */ .B });
8161881618
if (path.endsWith("Cargo.toml")) {
8161981619
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)(`cargo check --manifest-path ${path}`);
81620-
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("git commit **/Cargo.lock --message 'chore: Update Cargo lockfile'", {
81620+
(0,_command__WEBPACK_IMPORTED_MODULE_3__.sh)("shopt -s globstar; git commit **/Cargo.lock --message 'chore: Update Cargo lockfile'", {
8162181621
cwd: repo,
8162281622
env: _config__WEBPACK_IMPORTED_MODULE_5__/* .gitEnv */ .B,
8162381623
check: false,

src/set-git-branch.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ export async function main(input: Input) {
5757
for (const path of cargoPaths) {
5858
await cargo.setGitBranch(path, input.depsRegExp, input.depsGitUrl, input.depsBranch);
5959
if (sh("git diff", { cwd: repo, check: false })) {
60-
sh(`git add **/Cargo.toml*`, { cwd: repo });
60+
sh(`shopt -s globstar; git add **/Cargo.toml*`, { cwd: repo });
6161
sh(`git commit --message 'chore: Update git/branch ${path}'`, { cwd: repo, env: gitEnv });
6262

6363
if (path.endsWith("Cargo.toml")) {
6464
sh(`cargo check --manifest-path ${path}`);
65-
sh("git commit **/Cargo.lock --message 'chore: Update Cargo lockfile'", {
65+
sh("shopt -s globstar; git commit **/Cargo.lock --message 'chore: Update Cargo lockfile'", {
6666
cwd: repo,
6767
env: gitEnv,
6868
check: false,

0 commit comments

Comments
 (0)