Class: Dev::Platform

Inherits:
Object show all
Defined in:
lib/firespring_dev_commands/platform.rb

Overview

Class which returns information about the current platform

Constant Summary collapse

ALLOWED_ARCHITECTURES =

Constant containing all supported architectures

%w(linux/arm64 linux/amd64).freeze

Instance Method Summary collapse

Instance Method Details

#architectureObject

If an architecture was specified in the ENV, use that. Otherwise auto-deted based of the OS reported architecture



8
9
10
11
12
13
# File 'lib/firespring_dev_commands/platform.rb', line 8

def architecture
  arch = env_architecture || os_architecture
  raise "Invalid DOCKER_ARCHITECTURE: #{arch} (allowed are #{ALLOWED_ARCHITECTURES.join(', ')})" unless ALLOWED_ARCHITECTURES.include?(arch)

  arch
end