Skip to content

Commit e86ac83

Browse files
authored
Merge pull request #28 from code0-tech/26-onboard-velorum-as-new-component
Onboard velorum as new component
2 parents 6235970 + 8983651 commit e86ac83

5 files changed

Lines changed: 40 additions & 4 deletions

File tree

lib/pyxis/checks/tucana_version_match.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def initialize(component_info)
1212
end
1313

1414
def perform_check!
15-
[sagittarius_version, aquila_version, draco_version, taurus_version].uniq.size == 1
15+
[sagittarius_version, aquila_version, draco_version, taurus_version, velorum_version].uniq.size == 1
1616
end
1717

1818
def status_message
@@ -25,6 +25,7 @@ def status_message
2525
message << "aquila: #{aquila_version}"
2626
message << "draco: #{draco_version}"
2727
message << "taurus: #{taurus_version}"
28+
message << "velorum: #{velorum_version}"
2829

2930
message.join("\n")
3031
end
@@ -83,11 +84,28 @@ def taurus_version
8384
)
8485
end
8586

87+
def velorum_version
88+
@velorum_version ||= from_uv_lockfile(
89+
Base64.decode64(
90+
GithubClient.octokit.contents(
91+
Project::Velorum.github_path,
92+
path: 'uv.lock',
93+
ref: executed_component_info[:velorum]
94+
).content
95+
)
96+
)
97+
end
98+
8699
def from_cargo_lockfile(lockfile)
87100
toml = TomlRB.parse(lockfile, symbolize_keys: true)
88101
toml[:package].find { |package| package[:name] == 'tucana' }[:version]
89102
end
90103

104+
def from_uv_lockfile(lockfile)
105+
toml = TomlRB.parse(lockfile, symbolize_keys: true)
106+
toml[:package].find { |package| package[:name] == 'tucana' }[:version]
107+
end
108+
91109
def executed_component_info
92110
@executed_component_info ||= component_info.execute
93111
end

lib/pyxis/commands/components.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def info
4141
method_option :sagittarius_sha, desc: 'Commit SHA of sagittarius to build', type: :string
4242
method_option :sculptor_sha, desc: 'Commit SHA of sculptor to build', type: :string
4343
method_option :taurus_sha, desc: 'Commit SHA of taurus to build', type: :string
44+
method_option :velorum_sha, desc: 'Commit SHA of velorum to build', type: :string
4445
def build
4546
assert_executed_by_known_team_member!
4647

@@ -50,6 +51,7 @@ def build
5051
sagittarius: options[:sagittarius_sha],
5152
sculptor: options[:sculptor_sha],
5253
taurus: options[:taurus_sha],
54+
velorum: option[:velorum_sha],
5355
}.compact
5456

5557
pipeline = Pyxis::Services::CreateReticulumBuildService.new(version_overrides).execute

lib/pyxis/commands/internal.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ def check_canary_release
8484

8585
severity = check.pass? ? :info : :error
8686

87-
Pyxis::DiscordClient.new.send_notification(check.status_message, severity)
88-
8987
puts check.status_message
9088

89+
Pyxis::DiscordClient.new.send_notification(check.status_message, severity)
90+
9191
exit(false) unless check.pass?
9292
end
9393
end

lib/pyxis/project/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def component_name
3232
end
3333

3434
def self.components
35-
%i[aquila draco sagittarius sculptor taurus]
35+
%i[aquila draco sagittarius sculptor taurus velorum]
3636
end
3737

3838
def self.get_project(project)

lib/pyxis/project/velorum.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
module Pyxis
4+
module Project
5+
class Velorum < Base
6+
class << self
7+
def paths
8+
{
9+
github: 'code0-tech/velorum',
10+
gitlab: 'code0-tech/development/velorum',
11+
}
12+
end
13+
end
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)