Skip to content

Commit

Permalink
Merge branch 'master' into ci/pin-asciidoctor-action
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Dec 21, 2023
2 parents 148e867 + bd92ca8 commit f8b734b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

test-on-osx:
macos:
xcode: 13.2.1
xcode: 15.0.0
steps:
- with-brew-cache:
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-22.04, macos-12]
crystal: [latest, nightly]
include:
- os: windows-latest
- os: windows-2022
crystal: nightly
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -47,13 +47,13 @@ jobs:
sudo apt-get install fossil
- name: Install Fossil
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-12' }}
run: |
brew update
brew install fossil
- name: Install Fossil
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-2022' }}
run: choco install fossil

- name: Download source
Expand All @@ -69,7 +69,7 @@ jobs:
run: crystal tool format --check src spec

docs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Download source
uses: actions/checkout@v2
Expand Down
16 changes: 11 additions & 5 deletions src/package.cr
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,23 @@ module Shards
# link the project's lib path as the shard's lib path, so the dependency
# can access transitive dependencies:
unless resolver.is_a?(PathResolver)
lib_path = File.join(install_path, Shards::INSTALL_DIR)
Log.debug { "Link #{Shards.install_path} to #{lib_path}" }
Dir.mkdir_p(File.dirname(lib_path))
target = File.join(Path.new(Shards::INSTALL_DIR).parts.map { ".." })
File.symlink(target, lib_path)
install_lib_path
end

Shards.info.installed[name] = self
Shards.info.save
end

private def install_lib_path
lib_path = File.join(install_path, Shards::INSTALL_DIR)
return if File.exists?(lib_path)

Log.debug { "Link #{Shards.install_path} to #{lib_path}" }
Dir.mkdir_p(File.dirname(lib_path))
target = File.join(Path.new(Shards::INSTALL_DIR).parts.map { ".." })
File.symlink(target, lib_path)
end

protected def cleanup_install_directory
Log.debug { "rm -rf #{Process.quote(install_path)}" }
Shards::Helpers.rm_rf(install_path)
Expand Down

0 comments on commit f8b734b

Please sign in to comment.