Sha256: 98c42602ca04dbcc8a07a9e7e7c18abc623d01d34cb9eb8942126b338e370254

Contents?: true

Size: 1.21 KB

Versions: 14

Compression:

Stored size: 1.21 KB

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

STDOUT.sync = true

$LOAD_PATH.unshift File.expand_path("../../bridgetown/lib", __dir__)

# Used by commands/automations
require "active_support"
require "active_support/core_ext/array/extract_options"
require "active_support/core_ext/string/strip"
require "active_support/core_ext/string/indent"

require "bridgetown"

# Support NO_COLOR: https://no-color.org
# TODO: need to change behavior of Colorator gem
ENV["THOR_SHELL"] = "Basic" if ENV["NO_COLOR"]

output_version = if ARGV[0] == "-v" || ARGV[0] == "--version"
                   puts "bridgetown #{Bridgetown::VERSION} \"#{Bridgetown::CODE_NAME}\""
                   true
                 end

if env_index = ARGV.index { |arg| arg == "-e" } # rubocop:disable Lint/AssignmentInCondition
  env = ARGV[env_index + 1]
  ENV["BRIDGETOWN_ENV"] = env if env
elsif env_flag = ARGV.find { |arg| arg.start_with?("--environment=") } # rubocop:disable Lint/AssignmentInCondition
  ENV["BRIDGETOWN_ENV"] = env_flag.split("=").last
end

Bridgetown.begin!

require "bridgetown-core/commands/base"
begin
  Bridgetown::Commands::Base.start unless output_version
rescue StandardError => e
  Bridgetown::Errors.print_build_error(e)
  exit(false)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 bin/bridgetown
bridgetown-core-1.3.3 bin/bridgetown
bridgetown-core-1.3.2 bin/bridgetown
bridgetown-core-1.3.1 bin/bridgetown
bridgetown-core-1.3.0 bin/bridgetown
bridgetown-core-1.3.0.beta3 bin/bridgetown
bridgetown-core-1.3.0.beta2 bin/bridgetown
bridgetown-core-1.3.0.beta1 bin/bridgetown
bridgetown-core-1.2.0 bin/bridgetown
bridgetown-core-1.2.0.beta5 bin/bridgetown
bridgetown-core-1.2.0.beta4 bin/bridgetown
bridgetown-core-1.2.0.beta3 bin/bridgetown
bridgetown-core-1.2.0.beta2 bin/bridgetown
bridgetown-core-1.2.0.beta1 bin/bridgetown