Skip to content

Commit

Permalink
Merge branch 'main' into mf-release_0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfierke authored Oct 15, 2024
2 parents 12b0b14 + 0f83322 commit 6736728
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion spec/mstrap/paths_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Spectator.describe MStrap::Paths do
{% if flag?(:darwin) %}
expect(
MStrap::Paths::STRAP_SH_URL
).to eq("https://raw.githubusercontent.com/MikeMcQuaid/strap/main/strap.sh")
).to eq("https://raw.githubusercontent.com/MikeMcQuaid/strap/9bab07706bb1e143b8f1dbadf26d01d017f53436/bin/strap.sh")
{% elsif flag?(:linux) %}
expect(
MStrap::Paths::STRAP_SH_URL
Expand Down
2 changes: 1 addition & 1 deletion src/mstrap/paths.cr
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module MStrap

{% if flag?(:darwin) %}
# :nodoc:
STRAP_SH_URL = "https://raw.githubusercontent.com/MikeMcQuaid/strap/main/strap.sh"
STRAP_SH_URL = "https://raw.githubusercontent.com/MikeMcQuaid/strap/9bab07706bb1e143b8f1dbadf26d01d017f53436/bin/strap.sh"

{% if flag?(:aarch64) %}
# :nodoc:
Expand Down
12 changes: 4 additions & 8 deletions src/mstrap/steps/dependencies_step.cr
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ module MStrap
install_mise if runtime_managers.any? { |rm| rm.name == "mise" }
install_rustup if runtime_managers.any? { |rm| rm.name == "rustup" }
strap_sh
set_git_user!
load_profile!
brew_bundle
end

private def set_git_user!
log "==> Setting git user details: "
unless cmd("git", "config", "--global", "user.name", user.name, quiet: true) && cmd("git", "config", "--global", "user.email", user.email, quiet: true)
logc "Unable to set git user details. Is git installed?"
end

success "OK"
private def set_strap_env!
ENV["STRAP_GIT_NAME"] = user.name
ENV["STRAP_GIT_EMAIL"] = user.email
ENV["STRAP_GITHUB_USER"] = user.github
end

private def strap_sh
Expand Down

0 comments on commit 6736728

Please sign in to comment.