Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.

Commit 0c0fcf6

Browse files
hard link tool versions (#6)
1 parent 5759379 commit 0c0fcf6

File tree

6 files changed

+23
-9
lines changed

6 files changed

+23
-9
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install harness
5050
run: |
5151
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
52-
mix archive.install hex harness --organization cuatro --force
52+
mix archive.install hex harness --force
5353
5454
- name: Fetch mix dependencies
5555
if: steps.deps-cache.outputs.cache-hit != 'true'
@@ -120,7 +120,7 @@ jobs:
120120
- name: Install harness
121121
run: |
122122
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
123-
mix archive.install hex harness --organization cuatro --force
123+
mix archive.install hex harness --force
124124
125125
- name: Fetch mix dependencies
126126
if: steps.deps-cache.outputs.cache-hit != 'true'

.github/workflows/refresh-dev-cache.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Install harness
7373
run: |
7474
mix hex.organization auth cuatro --key $CUATRO_HEX_KEY
75-
mix archive.install hex harness --organization cuatro --force
75+
mix archive.install hex harness --force
7676
7777
- name: Fetch mix dependencies
7878
if: steps.deps-cache.outputs.cache-hit != 'true'

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ The format is based on [Keep a
66
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
77
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## 1.0.0 - 2021-03-17
10+
11+
### Added
12+
13+
- `.tool-versions` is now hard-linked instead of sym-linked
14+
- projects using this package should _not_ add the `.tool-versions` to
15+
their `.gitignore` anymore
16+
917
## 0.0.7 - 2021-01-25
1018

1119
### Added

fixture/harness.exs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Config
22

33
config :harness,
4+
version: "~> 0.6",
45
manifest_version: "2.0.0",
56
generators: [HarnessDotfiles],
67
deps: [

lib/harness_dotfiles.ex

+5-5
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ defmodule HarnessDotfiles do
109109
@doc false
110110
@impl Harness.Pkg
111111
def links(_config) do
112-
~w[
113-
.credo.exs
114-
.formatter.exs
115-
.tool-versions
116-
coveralls.json
112+
[
113+
{".tool-versions", :hard},
114+
{".credo.exs", :sym},
115+
{".formatter.exs", :sym},
116+
{"coveralls.json", :sym}
117117
]
118118
end
119119

test/harness_dotfiles_test.exs

+6-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ defmodule HarnessDotfilesTest do
1313

1414
test "_all_ generated files are linked" do
1515
generated_files = File.ls!("templates") |> MapSet.new()
16-
links = HarnessDotfiles.links(%HarnessDotfiles{}) |> MapSet.new()
16+
17+
links =
18+
%HarnessDotfiles{}
19+
|> HarnessDotfiles.links()
20+
|> Enum.map(fn {file, _link_type} -> file end)
21+
|> MapSet.new()
1722

1823
assert MapSet.equal?(generated_files, links)
1924
end

0 commit comments

Comments
 (0)