Skip to content

Commit 258569b

Browse files
committed
Remove unused previous_version method
Signed-off-by: Balasankar "Balu" C <[email protected]>
1 parent 5f3518a commit 258569b

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

lib/gitlab/build/info.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ def gitlab_rails_ref(prepend_version: true)
9090
Gitlab::Version.new('gitlab-rails').print(prepend_version)
9191
end
9292

93-
def previous_version
94-
# Get the second latest git tag
95-
previous_tag = Info::Git.latest_stable_tag(level: 2)
96-
previous_tag.tr("+", "-")
97-
end
98-
9993
def gitlab_rails_project_path
10094
if Gitlab::Util.get_env('CI_SERVER_HOST') == 'dev.gitlab.org'
10195
package == "gitlab-ee" ? 'gitlab/gitlab-ee' : 'gitlab/gitlabhq'

spec/lib/gitlab/build/info_spec.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,6 @@
107107
end
108108
end
109109

110-
describe '.previous_version' do
111-
it 'detects previous version correctly' do
112-
allow(Build::Info::Git).to receive(:`).and_call_original
113-
allow(Build::Info::Git).to receive(:`).with("git describe --exact-match 2>/dev/null").and_return('10.4.0+ee.0')
114-
allow(Build::Info::Git).to receive(:`).with(/git -c versionsort/).and_return("10.4.0+ee.0\n10.3.5+ee.0")
115-
116-
expect(described_class.previous_version).to eq("10.3.5-ee.0")
117-
end
118-
end
119-
120110
describe '.gitlab_rails repo' do
121111
describe 'with alternative sources channel selected' do
122112
before do

0 commit comments

Comments
 (0)