Skip to content

Commit

Permalink
add install script and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
doziestar committed Jun 25, 2024
1 parent 0380ec1 commit 384751d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,37 @@ jobs:
BINARY_NAME="server_forge"
ARCHIVE_NAME="server_forge-x86_64-unknown-linux-gnu.tar.gz"
tar czvf "../../../$ARCHIVE_NAME" "$BINARY_NAME"
- name: Create install script
run: |
cat << EOF > install.sh
#!/bin/bash
set -e
# Detect OS and architecture
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
if [ "$OS" != "linux" ] || [ "$ARCH" != "x86_64" ]; then
echo "Unsupported OS or architecture. This script is for Linux x86_64 only."
exit 1
fi
# Download the latest release
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/doziestar/serverforge/releases/latest | grep "browser_download_url.*tar.gz" | cut -d : -f 2,3 | tr -d \")
curl -L -o server_forge.tar.gz $LATEST_RELEASE_URL
# Extract the binary
tar -xzvf server_forge.tar.gz
# Install the binary
sudo mv server_forge /usr/local/bin/
sudo chmod +x /usr/local/bin/server_forge
# Clean up
rm server_forge.tar.gz
echo "ServerForge has been installed successfully!"
EOF
- name: Upload binary to release
uses: actions/upload-release-asset@v1
env:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serverforge"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
authors = ["Chidozie C. Okafor <chidosiky2015@gmail.com>"]
description = "ServerForge - A robust server setup and maintenance tool"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ ServerForge is designed to be easily customizable. To add or modify functionalit
2. Add or modify functions as needed.
3. Update the `main.rs` file if you've added new high-level functionality.

## Documentation

ServerForge is documented using Rustdoc. To generate the documentation: [Documentation](https://crates.io/crates/serverforge)



## Contributing

Contributions to ServerForge are welcome! Please follow these steps:
Expand Down

0 comments on commit 384751d

Please sign in to comment.