Skip to content

Commit

Permalink
actual fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshpenguin committed Sep 22, 2022
1 parent 00f37c7 commit 838a942
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Expand Up @@ -107,10 +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();
const isUpToDate = exec(`git -C ${pkgDir}/src/${pkg.name} fetch --dry-run`, false).toString().trim() == "";
if (isUpToDate) {
exec(`git -C ${pkgDir}/src/${pkg.name} fetch`);
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) {
console.log("📦 -> Already up to date (upstream), skipping");
return;
} else {
Expand Down

0 comments on commit 838a942

Please sign in to comment.