Skip to content

Instantly share code, notes, and snippets.

@mimikun
Created Sep 22, 2022
Embed
What would you like to do?
仮想通貨マイニングツールバージョン確認スクリプト供養
# GMiner v2.70
# PS C:\Users\username> t-rex --version
# T-Rex NVIDIA GPU miner v0.24.0 rev.6bef42b17a30
# curl -s "https://api.github.com/repos/develsoftware/GMinerRelease/releases/latest" | jq .tag_name -r
# 2.73
# curl -s https://api.github.com/repos/trexminer/T-Rex/releases/latest | jq .tag_name -r
# 0.24.7
$GMinerUrl = "https://api.github.com/repos/develsoftware/GMinerRelease/releases/latest"
$TRexUrl = "https://api.github.com/repos/trexminer/T-Rex/releases/latest"
$GMinerDownloadUrl = $GMinerUrl.Replace("api.", "").Replace("repos/", "")
$TRexDownloadUrl = $TRexUrl.Replace("api.", "").Replace("repos/", "")
$GMinerRes = Invoke-WebRequest $GMinerUrl
$TRexRes = Invoke-WebRequest $TRexUrl
$GMinerLatestVersion = $GMinerRes.Content | jq .tag_name -r
$TRexLatestVersion = $TRexRes.Content | jq .tag_name -r
Write-Output $GMinerLatestVersion
Write-Output $TRexLatestVersion
$GMinerCurrentVersion = miner --version
$GMinerCurrentVersion = $GMinerCurrentVersion.Replace(GMiner v, )
$TRexCurrentVersion = t-rex --version
$TRexCurrentVersion = $TRexCurrentVersion.Replace("T-Rex NVIDIA GPU miner v", "") -replace " rev.*", ""
Write-Output $GMinerCurrentVersion
Write-Output $TRexCurrentVersion
# https://github.com/develsoftware/GMinerRelease/releases/download/2.85/gminer_2_85_windows64.zip
# https://github.com/trexminer/T-Rex/releases/download/0.25.8/t-rex-0.25.8-win.zip
if ($GMinerCurrentVersion -ne $GMinerLatestVersion) {
Write-Output "Please update GMiner!!!"
Write-Output $GMinerDownloadUrl
}
if ($TRexCurrentVersion -ne $TRexLatestVersion) {
Write-Output "Please update T-Rex!!!"
Write-Output $TRexDownloadUrl
}
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment