Skip to content
Snippets Groups Projects
Commit d228bde2 authored by Jono Wenger's avatar Jono Wenger
Browse files

Rename client version functions and make GetVersion return the current xxDK WASM version

parent 9f176d2a
No related branches found
No related tags found
1 merge request!60Revert "Fail a test to be sure it works"
......@@ -170,8 +170,9 @@ func main() {
// wasm/version.go
js.Global().Set("GetVersion", js.FuncOf(wasm.GetVersion))
js.Global().Set("GetGitVersion", js.FuncOf(wasm.GetGitVersion))
js.Global().Set("GetDependencies", js.FuncOf(wasm.GetDependencies))
js.Global().Set("GetClientVersion", js.FuncOf(wasm.GetClientVersion))
js.Global().Set("GetClientGitVersion", js.FuncOf(wasm.GetClientGitVersion))
js.Global().Set("GetClientDependencies", js.FuncOf(wasm.GetClientDependencies))
<-make(chan bool)
os.Exit(0)
......
......@@ -11,29 +11,41 @@ package wasm
import (
"gitlab.com/elixxir/client/bindings"
"gitlab.com/elixxir/xxdk-wasm/utils"
"syscall/js"
)
// GetVersion returns the [xxdk.SEMVER].
// GetVersion returns the current xxDK WASM semantic version.
//
// Returns:
// - Version (string).
// - Current version (string).
func GetVersion(js.Value, []js.Value) interface{} {
return utils.SEMVER
}
// GetClientVersion returns the current client xxDK semantic version
// ([xxdk.SEMVER]).
//
// Returns:
// - Current version (string).
func GetClientVersion(js.Value, []js.Value) interface{} {
return bindings.GetVersion()
}
// GetGitVersion returns the [xxdk.GITVERSION].
// GetClientGitVersion returns the current client xxDK git version
// ([xxdk.GITVERSION]).
//
// Returns:
// - Git version (string).
func GetGitVersion(js.Value, []js.Value) interface{} {
func GetClientGitVersion(js.Value, []js.Value) interface{} {
return bindings.GetGitVersion()
}
// GetDependencies returns the [xxdk.DEPENDENCIES].
// GetClientDependencies returns the client's dependencies
// ([xxdk.DEPENDENCIES]).
//
// Returns:
// - Git dependencies (string).
func GetDependencies(js.Value, []js.Value) interface{} {
// - Dependency list (string).
func GetClientDependencies(js.Value, []js.Value) interface{} {
return bindings.GetDependencies()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment