Class: SecureKeys::Swift::Package

Inherits:
Object
  • Object
show all
Defined in:
lib/core/utils/swift/package.rb

Instance Method Summary collapse

Instance Method Details

#generateObject

Generate the Swift Package using the configured path



10
11
12
13
14
15
16
17
18
19
# File 'lib/core/utils/swift/package.rb', line 10

def generate
  command = <<~BASH
    rm -rf #{SWIFT_PACKAGE_DIRECTORY} &&
    mkdir -p #{SWIFT_PACKAGE_DIRECTORY} &&
    cd #{SWIFT_PACKAGE_DIRECTORY} &&
    swift package init --name #{SWIFT_PACKAGE_NAME} --type library
  BASH

  Core::Console::Shell.sh(command:)
end