Class: Keys::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



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

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

  system(command)
end