Skip to content

llpkg store Design

xushiwei edited this page Jan 21, 2025 · 16 revisions

llpkg Directory Structure

+ {LibraryName}
   |
   +-- {Version}
   |     |
   |     +-- {NormalGoPkgFiles}
   |     |
   |     +-- .llpkg (optional)
   |           |
   |           +-- {InstallScriptForLibrary}
   |           |
   |           +-- {BuildScriptForGoPkgFiles}
   |
   +-- .llpkg
         |
         +-- {InstallScriptForLibrary}
         |
         +-- {BuildScriptForGoPkgFiles}

llpkg Version Management

llpkg in go.mod:

require (
    llpkg.gop.dev/{LibraryName} {Version}
)

For example

require (
    llpkg.gop.dev/sqlite/v3 v3.48.0
)

llgo get

llgo get {LibraryName}[@{Version}]

For example

Its workflow is as follows

list tags of github.com/goplus/llpkg to get latest version of {LibraryName} if {Version} not specified
wgetIfNoCache https://github.com/goplus/llpkg/releases/download/{LibraryName}@{Version}/Package.zip
unzip {CacheDir}/{LibraryName}@{Version}/Package.zip
edit go.work to replace llpkg.gop.dev/{LibraryName} {Version} => {CacheDir}/{LibraryName}@{Version}
exec {CacheDir}/{LibraryName}@{Version}/.llpkg/{InstallScriptForLibrary}

merge PR to release

Release workflow is as follows

tag github.com/goplus/llpkg with {LibraryName}@{Version} and Release
upload https://github.com/goplus/llpkg/releases/download/{LibraryName}@{Version}/Package.zip
Clone this wiki locally