Skip to content

Commit

Permalink
tests(homebrew): update archive urls to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
nikaro committed May 17, 2024
1 parent b930e9a commit e1e65af
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions lib/modules/manager/homebrew/__fixtures__/ibazel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# limitations under the License.

=begin
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
=end
# url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
# url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
# sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'

$sha256 = '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4';
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"

# To generate run:
# curl https://codeload.github.com/bazelbuild/bazel-watcher/tar.gz/v0.8.2 | sha256sum
Expand Down
14 changes: 7 additions & 7 deletions lib/modules/manager/homebrew/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('modules/manager/homebrew/extract', () => {
const content = `class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -63,7 +63,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel !?# Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -75,7 +75,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel < NotFormula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -87,7 +87,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
not_url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
not_url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -102,7 +102,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url ??https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url ??https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand Down Expand Up @@ -132,7 +132,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
not_sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -147,7 +147,7 @@ describe('modules/manager/homebrew/extract', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b0229'
end
`;
Expand Down
34 changes: 17 additions & 17 deletions lib/modules/manager/homebrew/update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand Down Expand Up @@ -72,7 +72,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand All @@ -82,7 +82,7 @@ describe('modules/manager/homebrew/update', () => {
'/bazelbuild/bazel-watcher/releases/download/v0.9.3/bazel-watcher-0.9.3.tar.gz',
)
.replyWithError('')
.get('/bazelbuild/bazel-watcher/archive/v0.9.3.tar.gz')
.get('/bazelbuild/bazel-watcher/archive/refs/tags/v0.9.3.tar.gz')
.replyWithError('');
const newContent = await updateDependency({
fileContent: ibazel,
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'invalid/repo/name',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand All @@ -134,7 +134,7 @@ describe('modules/manager/homebrew/update', () => {
'/bazelbuild/invalid/repo/name/releases/download/v0.9.3/invalid/repo/name-0.9.3.tar.gz',
)
.replyWithError('')
.get('/bazelbuild/invalid/repo/name/archive/v0.9.3.tar.gz')
.get('/bazelbuild/invalid/repo/name/archive/refs/tags/v0.9.3.tar.gz')
.reply(200, Readable.from(['foo']));
const newContent = await updateDependency({
fileContent: content,
Expand All @@ -151,21 +151,21 @@ describe('modules/manager/homebrew/update', () => {
depName: 'Ibazel',
managerData: {
ownerName: 'bazelbuild',
repoName: 'wrong-version/archive/v10.2.3.tar.gz',
repoName: 'wrong-version/archive/refs/tags/v10.2.3.tar.gz',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
httpMock
.scope(baseUrl)
.get(
'/bazelbuild/wrong-version/archive/v10.2.3.tar.gz/releases/download/v0.9.3/wrong-version/archive/v10.2.3.tar.gz-0.9.3.tar.gz',
'/bazelbuild/wrong-version/archive/refs/tags/v10.2.3.tar.gz/releases/download/v0.9.3/wrong-version/archive/refs/tags/v10.2.3.tar.gz-0.9.3.tar.gz',
)
.replyWithError('')
.get(
'/bazelbuild/wrong-version/archive/v10.2.3.tar.gz/archive/v0.9.3.tar.gz',
'/bazelbuild/wrong-version/archive/refs/tags/v10.2.3.tar.gz/archive/refs/tags/v0.9.3.tar.gz',
)
.reply(200, Readable.from(['foo']));
const newContent = await updateDependency({
Expand All @@ -181,7 +181,7 @@ describe('modules/manager/homebrew/update', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url ???https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url ???https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 '26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -193,7 +193,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand Down Expand Up @@ -227,7 +227,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand All @@ -250,7 +250,7 @@ describe('modules/manager/homebrew/update', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
sha256 ???26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4'
end
`;
Expand All @@ -262,7 +262,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand All @@ -285,7 +285,7 @@ describe('modules/manager/homebrew/update', () => {
class Ibazel < Formula
desc 'IBazel is a tool for building Bazel targets when source files change.'
homepage 'https://github.com/bazelbuild/bazel-watcher'
url "https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz"
url "https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz"
end
`;
const upgrade = {
Expand All @@ -296,7 +296,7 @@ describe('modules/manager/homebrew/update', () => {
repoName: 'bazel-watcher',
sha256:
'26f5125218fad2741d3caf937b02296d803900e5f153f5b1f733f15391b9f9b4',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/v0.8.2.tar.gz',
url: 'https://github.com/bazelbuild/bazel-watcher/archive/refs/tags/v0.8.2.tar.gz',
},
newValue: 'v0.9.3',
};
Expand Down Expand Up @@ -331,7 +331,7 @@ describe('modules/manager/homebrew/update', () => {
.scope(baseUrl)
.get('/aide/aide/releases/download/v0.17.7/aide-0.17.7.tar.gz')
.replyWithError('')
.get('/aide/aide/archive/v0.17.7.tar.gz')
.get('/aide/aide/archive/refs/tags/v0.17.7.tar.gz')
.replyWithError('');
const newContent = await updateDependency({
fileContent: aide,
Expand Down

0 comments on commit e1e65af

Please sign in to comment.