generated from PlexSheep/rs-base
ready for release
cargo devel CI / cargo CI (push) Successful in 2m4s
Details
cargo devel CI / cargo CI (push) Successful in 2m4s
Details
This commit is contained in:
parent
52ac674e50
commit
9fbf8ecdf5
|
@ -1,7 +1,6 @@
|
|||
workspace = { members = ["spammer"] }
|
||||
[package]
|
||||
name = "netpong"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2021"
|
||||
publish = true
|
||||
authors = ["Christoph J. Scherr <software@cscherr.de>"]
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# rs-base
|
||||
# netpong
|
||||
|
||||
Base repository for rust projects
|
||||
Let your hosts play Pingpong over a tls connection.
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
mkdir data
|
||||
echo create ca
|
||||
# non-interactive and 10 years expiration
|
||||
openssl req -x509 -nodes -newkey rsa:4096 -keyout data/key.pem -out data/cert.pem -sha256 -days 3650 -subj '/CN=localhost'
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
cargo check --all-features
|
||||
echo ">>>>>>>> PUBLISHING RELEASE FOR REPO"
|
||||
bash scripts/release.sh
|
||||
echo ">>>>>>>> PUBLISHING TO CRATES.IO NEXT"
|
||||
sleep 2
|
||||
cargo publish
|
||||
echo ">>>>>>>> PUBLISHING TO CSCHERR.DE NEXT"
|
||||
sleep 2
|
||||
cargo publish --registry cscherr
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
TOKEN=$(cat ~/.git-credentials | grep 'git.cscherr.de' | grep -P '(?:)[^:]*(?=@)' -o)
|
||||
NEW_VERSION=$(cat Cargo.toml | rg '^\s*version\s*=\s*"([^"]*)"\s*$' -or '$1')
|
||||
GIT_COMMIT_SHA=$(git rev-parse HEAD)
|
||||
REPO=${PWD##*/} # name of cwd
|
||||
BODY="
|
||||
$(git log $(git describe --tags --abbrev=0)..HEAD --pretty="- %s" --oneline --decorate)
|
||||
"
|
||||
USER=PlexSheep
|
||||
git tag "v$NEW_VERSION-test" || echo "could not tag"
|
||||
curl -X 'POST' \
|
||||
'https://git.cscherr.de/api/v1/repos/PlexSheep/'$REPO'/releases' \
|
||||
-H 'accept: application/json' \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"body": "'"$BODY"'",
|
||||
"draft": false,
|
||||
"name": "v'$NEW_VERSION'",
|
||||
"prerelease": true,
|
||||
"tag_name": "v'$NEW_VERSION'",
|
||||
"target_commitish": "'$GIT_COMMIT_SHA'"
|
||||
}' | python -m json.tool
|
||||
git push || echo "could not push"
|
|
@ -1,9 +0,0 @@
|
|||
[package]
|
||||
name = "spammer"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
threadpool = "1.8.1"
|
|
@ -1,18 +0,0 @@
|
|||
use threadpool::ThreadPool;
|
||||
const MAX: usize = 20;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let pool = ThreadPool::new(MAX);
|
||||
|
||||
loop {
|
||||
if pool.queued_count() < MAX {
|
||||
pool.execute(|| {
|
||||
let mut cmd = Command::new("/usr/bin/python3");
|
||||
cmd.args(["../scripts/client.py"]);
|
||||
let _ = cmd.output().unwrap();
|
||||
});
|
||||
}
|
||||
std::thread::sleep(std::time::Duration::from_millis(100));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue