Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hasLockfileCommit): specify origin when fetching #184

Merged
merged 2 commits into from
Jul 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/git-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
// console.log(`git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*`)
exec(`git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*`)
// console.log(`git fetch`)
exec(`git fetch`)
exec(`git fetch gk-origin`)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be ideal to have this gk-origin value stored isomewhere, as it is referenced here and in upload.js but not sure where to put it.

// console.log(`git checkout master`)
// Sometimes weird things happen with Git, so let's make sure that we have a clean
// working tree before we go in!
Expand Down
16 changes: 8 additions & 8 deletions test/__snapshots__/update.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`monorepo: no package.json 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand All @@ -14,7 +14,7 @@ Array [
exports[`monorepo: no root and one sub package 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand All @@ -39,7 +39,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: no root and two sub package 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down Expand Up @@ -71,7 +71,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: no root and two sub package at different levels 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down Expand Up @@ -103,7 +103,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: root and one sub package 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down Expand Up @@ -135,7 +135,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: root and two sub package 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down Expand Up @@ -174,7 +174,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: root and two sub package at different levels 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down Expand Up @@ -213,7 +213,7 @@ https://npm.im/greenkeeper-lockfile\\"",
exports[`monorepo: root package 1`] = `
Array [
"git config --replace-all remote.origin.fetch +refs/heads/*:refs/remotes/origin/*",
"git fetch",
"git fetch gk-origin",
"git stash",
"git checkout master",
"git log --oneline origin/greenkeeper/my-dependency-1.0.0...master | grep 'chore(package): update lockfile'",
Expand Down