diff options
author | Adam <adamdharrison@gmail.com> | 2022-10-21 21:56:45 -0400 |
---|---|---|
committer | Adam <adamdharrison@gmail.com> | 2022-10-21 21:56:45 -0400 |
commit | 49bae736fc589a4a82cfeab1e73e3a9db650f190 (patch) | |
tree | cb652044ebaa287234a21388fef7e054288d16c5 | |
parent | 7a4896c3b3d2f41cda46959c25c1c7e13e79e116 (diff) | |
download | lite-xl-plugin-manager-49bae736fc589a4a82cfeab1e73e3a9db650f190.tar.gz lite-xl-plugin-manager-49bae736fc589a4a82cfeab1e73e3a9db650f190.zip |
Made sure to fetch all tags.
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | src/lpm.c | 1 | ||||
-rw-r--r-- | src/lpm.lua | 3 |
3 files changed, 12 insertions, 10 deletions
@@ -11,8 +11,8 @@ Releases forthcoming, should be available on Windows, Mac, Linux and FreeBSD. Also contains a plugin_manager.lua plugin to integrate the binary with lite in the form of an easy-to-use GUI. -By default, `lpm` will automatically consume the specification in the `latest` -branch of this repository. +By default in releases, `lpm` will automatically consume the specification +in the `latest` branch of this repository. ## Specification @@ -50,13 +50,13 @@ I'm only ensuring that everything can be linked statically as much as possible. As seen with the `lib` folder, the following external libraries are used to build `lpm`: -* lua (core program written in) -* OpenSSL (https/SSL support) -* libgit2 (accessing git repositories directly) -* liblzma (supporting library for archives) -* libz (supporting library for everything) -* libcurl (for fetching .tar.gz and .zip files) -* libarchive (for unpacking .tar.gz and .zip files) +* `lua` (core program written in) +* `OpenSSL` (https/SSL support) +* `libgit2` (accessing git repositories directly) +* `liblzma` (supporting library for archives) +* `libz` (supporting library for everything) +* `libcurl` (for fetching .tar.gz and .zip files) +* `libarchive` (for unpacking .tar.gz and .zip files) ## Use in CI @@ -341,6 +341,7 @@ static int lpm_fetch(lua_State* L) { return luaL_error(L, "git remote fetch error: %s", git_error_last_string()); } git_fetch_options fetch_opts = GIT_FETCH_OPTIONS_INIT; + fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL; if (git_remote_fetch(remote, NULL, &fetch_opts, NULL)) { git_remote_free(remote); git_repository_free(repository); diff --git a/src/lpm.lua b/src/lpm.lua index c0752f0..238d5f9 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1574,7 +1574,8 @@ Flags have the following effects: local hash = system.hash(lite_xl_binary, "file") local system_lite_xl = common.first(common.concat(common.flat_map(repositories, function(r) return r.lite_xls end), lite_xls), function(lite_xl) return lite_xl.local_path == directory end) if not system_lite_xl then - if #common.grep(lite_xls, function(e) return e.version == "system" end) > 0 then error("can't create new system lite, please `lpm rm lite-xl system`, or resolve otherwise") end + system_lite_xl = common.first(lite_xls, function(e) return e.version == "system" end) + if system_lite_xl then error("can't find existing system lite (does " .. system_lite_xl.local_path .. " exist? was it moved?); run `lpm purge`, or resolve otherwise") end system_lite_xl = LiteXL.new(nil, { path = directory, mod_version = 3, version = "system", tags = { "system", "local" } }) table.insert(lite_xls, system_lite_xl) lpm_lite_xl_save() |