Compare commits

...

3 Commits
0.1.0 ... 0.1.1

Author SHA1 Message Date
5341728b41 chore(release): 0.1.1 2020-09-19 18:45:02 +01:00
f8515ad3a4 chore(libs): simplify embedded libs folder path 2020-09-19 18:43:21 +01:00
c89d0a0b73 fix(internal): improve macOS version detection
Turns out that `sw_vers -productVersion` doesn't always return a version
string with a `MAJOR.MINOR.PATCH` format, but can also just return two
digits, like `11.0` on the current beta of macOS Big Sur.

Fixes: #13
2020-09-10 20:33:18 +01:00
2 changed files with 12 additions and 5 deletions

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [0.1.1](https://github.com/jimeh/build-emacs-for-macos/compare/0.1.0...0.1.1) (2020-09-19)
### Bug Fixes
* **internal:** improve macOS version detection ([c89d0a0](https://github.com/jimeh/build-emacs-for-macos/commit/c89d0a0b73dfc82d918c326d89b141f8a2fc4de4)), closes [#13](https://github.com/jimeh/build-emacs-for-macos/issues/13)
## 0.1.0 (2020-09-05)

View File

@@ -45,7 +45,7 @@ end
class OSVersion
def initialize
@version = `sw_vers -productVersion`.match(
/(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/
/(?<major>\d+)(?:\.(?<minor>\d+)(:?\.(?<patch>\d+))?)?/
)
end
@@ -54,15 +54,15 @@ class OSVersion
end
def major
@major ||= @version[:major].to_i
@major ||= @version[:major]&.to_i
end
def minor
@minor ||= @version[:minor].to_i
@minor ||= @version[:minor]&.to_i
end
def patch
@patch ||= @version[:patch].to_i
@patch ||= @version[:patch]&.to_i
end
end
@@ -570,7 +570,7 @@ class AbstractEmbedder
end
def lib_dir_name
"lib-#{OS.arch}-#{OS.version}"
"lib-#{OS.arch}-#{OS.version.to_s.tr('.', '_')}"
end
end