@gearbox-protocol/deploy-tools 4.24.0 → 4.24.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.
Files changed (2) hide show
  1. package/dist/index.mjs +20 -6
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -342345,14 +342345,28 @@ async function cloneRepo(opts) {
342345
342345
  }
342346
342346
  log.trace(`reset ${repoPath} to ${commit}`);
342347
342347
  } else {
342348
- log.trace(`pulling ${repoPath}...`);
342349
- let { stderr, status, error } = spawnSync("git", ["pull"], {
342348
+ log.trace(`fetching latest from ${repoPath}...`);
342349
+ const fetchResult = spawnSync("git", ["fetch", "--all"], {
342350
342350
  cwd: path.resolve(sandboxDir, destDir)
342351
342351
  });
342352
- if (error || status !== 0) {
342353
- throw error ?? new Error(stderr?.toString());
342352
+ if (fetchResult.error || fetchResult.status !== 0) {
342353
+ throw fetchResult.error ?? new Error(fetchResult.stderr?.toString());
342354
+ }
342355
+ let currentBranchResult = spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"], {
342356
+ cwd: path.resolve(sandboxDir, destDir)
342357
+ });
342358
+ if (currentBranchResult.error || currentBranchResult.status !== 0) {
342359
+ throw currentBranchResult.error ?? new Error(currentBranchResult.stderr?.toString());
342360
+ }
342361
+ const currentBranch = currentBranchResult.stdout.toString().trim();
342362
+ log.trace(`resetting ${repoPath} to latest commit in origin/${currentBranch}...`);
342363
+ let resetResult = spawnSync("git", ["reset", "--hard", `origin/${currentBranch}`], {
342364
+ cwd: path.resolve(sandboxDir, destDir)
342365
+ });
342366
+ if (resetResult.error || resetResult.status !== 0) {
342367
+ throw resetResult.error ?? new Error(resetResult.stderr?.toString());
342354
342368
  }
342355
- log.trace(`pulled ${repoPath}...`);
342369
+ log.trace(`updated ${repoPath} to the latest commit`);
342356
342370
  }
342357
342371
  }
342358
342372
  async function clearDir(dir) {
@@ -366454,7 +366468,7 @@ function getRenderer(opts) {
366454
366468
  }
366455
366469
 
366456
366470
  // package.json
366457
- var version3 = "4.24.0";
366471
+ var version3 = "4.24.2";
366458
366472
 
366459
366473
  // src/version.ts
366460
366474
  var version_default = version3;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/deploy-tools",
3
3
  "description": "Gearbox deploy tools",
4
- "version": "4.24.0",
4
+ "version": "4.24.2",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"