2022-11-18 19:25:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-03-23 16:45:15 +00:00
|
|
|
# prepare new [gupaxx] version in:
|
2022-11-18 19:25:13 +00:00
|
|
|
# 1. README.md
|
|
|
|
# 2. CHANGELOG.md
|
|
|
|
# 3. Cargo.toml
|
|
|
|
|
|
|
|
# $1 = new_version
|
|
|
|
set -ex
|
|
|
|
sudo -v
|
|
|
|
[[ $1 = v* ]]
|
2024-03-23 16:45:15 +00:00
|
|
|
[[ $PWD = */gupaxx ]]
|
2022-11-18 19:25:13 +00:00
|
|
|
|
|
|
|
# get old GUPAX_VER
|
|
|
|
OLD_VER="v$(grep -m1 "version" Cargo.toml | grep -o "[0-9].[0-9].[0-9]")"
|
2022-12-23 18:33:40 +00:00
|
|
|
OLD_VER_NUM="$(grep -m1 "version" Cargo.toml | grep -o "[0-9].[0-9].[0-9]")"
|
2022-11-18 19:25:13 +00:00
|
|
|
|
2022-12-21 15:59:35 +00:00
|
|
|
# get p2pool/xmrig version
|
|
|
|
P2POOL_VERSION="$(grep "P2POOL_VERSION" src/constants.rs | grep -o "\"v[0-9].*\"")"
|
|
|
|
XMRIG_VERSION="$(grep "XMRIG_VERSION" src/constants.rs | grep -o "\"v[0-9].*\"")"
|
2024-06-28 09:06:37 +00:00
|
|
|
XMRIG_PROXY_VERSION="$(grep "XMRIG_PROXY_VERSION" src/constants.rs | grep -o "\"v[0-9].*\"")"
|
2022-12-21 15:59:35 +00:00
|
|
|
|
2022-11-18 19:25:13 +00:00
|
|
|
# sed change
|
|
|
|
sed -i "s/$OLD_VER/$1/g" README.md
|
2022-12-23 18:33:40 +00:00
|
|
|
sed -i 's/^version = "$OLD_VER_NUM"/$1/' Cargo.toml
|
2022-11-18 19:25:13 +00:00
|
|
|
|
|
|
|
# changelog
|
|
|
|
cat << EOM > CHANGELOG.md.new
|
|
|
|
# $1
|
|
|
|
## Updates
|
|
|
|
*
|
|
|
|
|
|
|
|
## Fixes
|
|
|
|
*
|
|
|
|
|
2022-12-21 15:59:35 +00:00
|
|
|
## Bundled Versions
|
|
|
|
* [\`P2Pool ${P2POOL_VERSION//\"/}\`](https://github.com/SChernykh/p2pool/releases/tag/${P2POOL_VERSION//\"/})
|
|
|
|
* [\`XMRig ${XMRIG_VERSION//\"/}\`](https://github.com/xmrig/xmrig/releases/tag/${XMRIG_VERSION//\"/})
|
2024-06-28 09:06:37 +00:00
|
|
|
* [\`XMRig_Proxy ${XMRIG_PROXY_VERSION//\"/}\`](https://github.com/xmrig/xmrig-proxy/releases/tag/${XMRIG_PROXY_VERSION//\"/})
|
2022-11-22 02:01:50 +00:00
|
|
|
|
2023-02-06 22:59:51 +00:00
|
|
|
|
2022-11-18 19:25:13 +00:00
|
|
|
---
|
|
|
|
|
2022-11-22 02:01:50 +00:00
|
|
|
|
2022-11-18 19:25:13 +00:00
|
|
|
EOM
|
|
|
|
cat CHANGELOG.md >> CHANGELOG.md.new
|
|
|
|
mv -f CHANGELOG.md.new CHANGELOG.md
|
|
|
|
|
|
|
|
# commit
|
2022-11-23 04:21:46 +00:00
|
|
|
git add CHANGELOG.md README.md
|
2022-11-18 19:25:13 +00:00
|
|
|
git commit -m "prepare $1"
|