Create deb package #87
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,3 +6,6 @@ config.toml
|
||||
/.direnv/
|
||||
result
|
||||
result-*
|
||||
|
||||
# Packaging
|
||||
/assets/completions/
|
44
Cargo.toml
44
Cargo.toml
@ -2,6 +2,16 @@
|
||||
name = "mysqladm-rs"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
license = "BSD3"
|
||||
authors = [
|
||||
"oysteikt@pvv.ntnu.no",
|
||||
"felixalb@pvv.ntnu.no",
|
||||
]
|
||||
repository = "https://git.pvv.ntnu.no/Projects/mysqladm-rs"
|
||||
description = "A command-line utility for MySQL administration for non-admin users"
|
||||
categories = ["command-line-interface", "command-line-utilities"]
|
||||
keywords = ["mysql", "cli", "administration"]
|
||||
readme = "README.md"
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.95"
|
||||
@ -54,3 +64,37 @@ anyhow = "1.0.95"
|
||||
|
||||
[dev-dependencies]
|
||||
regex = "1.11.1"
|
||||
|
||||
# TODO: package shell completions
|
||||
[package.metadata.deb]
|
||||
maintainer = "Programvareverkstedet <projects@pvv.ntnu.no>"
|
||||
section = "admin"
|
||||
assets = [
|
||||
[
|
||||
"target/release/mysqladm",
|
||||
"usr/bin/",
|
||||
"755",
|
||||
],
|
||||
[
|
||||
"example-config.toml",
|
||||
"etc/mysqladm/config.toml",
|
||||
"644",
|
||||
],
|
||||
[
|
||||
"assets/completions/_*",
|
||||
"usr/share/zsh/site-functions/completions/",
|
||||
"644",
|
||||
],
|
||||
[
|
||||
"assets/completions/*.bash",
|
||||
"usr/share/bash-completion/completions/",
|
||||
"644",
|
||||
],
|
||||
[
|
||||
"assets/completions/*.fish",
|
||||
"usr/share/fish/vendor_completions.d/",
|
||||
"644",
|
||||
],
|
||||
]
|
||||
conf-files = ["etc/mysqladm/config.toml"]
|
||||
depends = []
|
||||
|
19
create-deb.sh
Executable file
19
create-deb.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cargo build --release
|
||||
|
||||
mkdir -p assets/completions
|
||||
|
||||
./target/release/mysqladm generate-completions --shell bash > assets/completions/mysqladm.bash
|
||||
./target/release/mysqladm generate-completions --shell zsh > assets/completions/_mysqladm
|
||||
./target/release/mysqladm generate-completions --shell fish > assets/completions/mysqladm.fish
|
||||
|
||||
./target/release/mysqladm generate-completions --shell bash --command mysql-dbadm > assets/completions/mysql-dbadm.bash
|
||||
./target/release/mysqladm generate-completions --shell zsh --command mysql-dbadm > assets/completions/_mysql-dbadm
|
||||
./target/release/mysqladm generate-completions --shell fish --command mysql-dbadm > assets/completions/mysql-dbadm.fish
|
||||
|
||||
./target/release/mysqladm generate-completions --shell bash --command mysql-useradm > assets/completions/mysql-useradm.bash
|
||||
./target/release/mysqladm generate-completions --shell zsh --command mysql-useradm > assets/completions/_mysql-useradm
|
||||
./target/release/mysqladm generate-completions --shell fish --command mysql-useradm > assets/completions/mysql-useradm.fish
|
||||
|
||||
cargo deb
|
@ -19,4 +19,4 @@ port = 3306
|
||||
username = "root"
|
||||
password = "secret"
|
||||
|
||||
timeout = 2 # seconds
|
||||
timeout = 2 # seconds
|
||||
|
Loading…
Reference in New Issue
Block a user