Skip to content

Commit

Permalink
Fix git check
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshpenguin committed Sep 22, 2022
1 parent 0a78f12 commit 00f37c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.ts
Expand Up @@ -107,9 +107,10 @@ async function buildPackage(pkg: Package) {
// check if rebuilding is nessesary by compare rev-parse of local and remote

try {
const remoteRev = exec(`git -C ${pkgDir}/src/${pkg.name} rev-parse @{u}`, false).toString().trim();
const localRev = exec(`git -C ${pkgDir}/src/${pkg.name} rev-parse @`, false).toString().trim();
if (remoteRev === localRev) {
//const remoteRev = exec(`git -C ${pkgDir}/src/${pkg.name} rev-parse @{u}`, false).toString().trim();
//const localRev = exec(`git -C ${pkgDir}/src/${pkg.name} rev-parse @`, false).toString().trim();
const isUpToDate = exec(`git -C ${pkgDir}/src/${pkg.name} fetch --dry-run`, false).toString().trim() == "";
if (isUpToDate) {
console.log("📦 -> Already up to date (upstream), skipping");
return;
} else {
Expand Down

0 comments on commit 00f37c7

Please sign in to comment.