Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(gomod): use latest go version when binarySource=docker (#9764)
Fixes #9761
  • Loading branch information
rarkins committed Apr 28, 2021
1 parent 5d9bb5e commit d9de349
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/manager/gomod/__snapshots__/extract.spec.ts.snap
Expand Up @@ -3,7 +3,7 @@
exports[`manager/gomod/extract extractPackageFile() extracts constraints 1`] = `
Object {
"constraints": Object {
"go": "1.13",
"go": "^1.13",
},
"deps": Array [
Object {
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/gomod/extract.spec.ts
Expand Up @@ -21,7 +21,7 @@ describe(getName(__filename), () => {
it('extracts constraints', () => {
const res = extractPackageFile(gomod3);
expect(res).toMatchSnapshot();
expect(res.constraints.go).toEqual('1.13');
expect(res.constraints.go).toEqual('^1.13');
});
it('extracts multi-line requires', () => {
const res = extractPackageFile(gomod2).deps;
Expand Down
2 changes: 1 addition & 1 deletion lib/manager/gomod/extract.ts
Expand Up @@ -43,7 +43,7 @@ export function extractPackageFile(content: string): PackageFile | null {
for (let lineNumber = 0; lineNumber < lines.length; lineNumber += 1) {
let line = lines[lineNumber];
if (line.startsWith('go ') && validRange(line.replace('go ', ''))) {
constraints.go = line.replace('go ', '');
constraints.go = line.replace('go ', '^');
}
const replaceMatch = /^replace\s+[^\s]+[\s]+[=][>]\s+([^\s]+)\s+([^\s]+)/.exec(
line
Expand Down

0 comments on commit d9de349

Please sign in to comment.