Skip to content

Commit

Permalink
branched2
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshpenguin committed Feb 23, 2023
1 parent d83a2da commit 7c3565a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Expand Up @@ -122,9 +122,9 @@ async function buildPackage(pkg: Package) {
const aportsPkgDir = path.join(WORKDIR, "aports", pkg.aports_repo, pkg.name);

// check if rebuilding is necessary by compare rev-parse of local and remote
let branch = process.env.BUILD_SINGLE_PACKAGE_BRANCH ?? "kf5";
try {
exec(`git -C ${pkgDir}/src/${pkg.name} fetch`);
let branch = process.env.BUILD_SINGLE_PACKAGE_BRANCH ?? "kf5";
try {
exec(`git -C ${pkgDir}/src/${pkg.name} checkout ` + branch);
console.log("🔧 -> Using " + branch + " branch");
Expand Down Expand Up @@ -160,8 +160,8 @@ async function buildPackage(pkg: Package) {

// check if the "kf5" branch exists, if so, use it
try {
exec(`git -C ${pkgDir}/src/${pkg.name} checkout kf5`);
console.log("🔧 -> Using kf5 branch");
exec(`git -C ${pkgDir}/src/${pkg.name} checkout ${branch}`);
console.log("🔧 -> Using " + branch + " branch");
} catch {
console.log("🔧 -> Using master branch");
}
Expand Down

0 comments on commit 7c3565a

Please sign in to comment.