commit c11912befb4d692becc8801bdf732c0ce3199b65
parent 2868b005e9ad0a5cca9982bf919551a4273ce6d2
Author: Robin <kroekerrobin@gmail.com>
Date: Sun, 19 Feb 2023 18:44:58 +0100
Config stuff
Diffstat:
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/.editorconfig b/.editorconfig
@@ -2,6 +2,10 @@
indent_style = tab
indent_size = 2
+[*.sh]
+indent_style = tab
+indent_size = 2
+
[README.md]
indent_style = tab
indent_size = 2
diff --git a/.gitignore b/.gitignore
@@ -1 +1,3 @@
/target
+# all release builds
+songs_v*
diff --git a/Cargo.lock b/Cargo.lock
@@ -490,7 +490,7 @@ dependencies = [
[[package]]
name = "songs"
-version = "1.0.0"
+version = "1.0.1"
dependencies = [
"clap",
"frankenstein",
diff --git a/build_for_release.sh b/build_for_release.sh
@@ -1,10 +1,17 @@
-#!/bin/sh
+#!/bin/bash
# Using musl means everything is compiled statically
# which results in an independant binary be able to
# run in on any x86_64 based system. (That's how I understand it)
read -p "Version Number (e.g. v1.2.3): " versionNumber
-cmds[0]="git tag -a $versionNumber -m $versionNumber"
-cmds[1]="cargo build -r --target x86_64-unknown-linux-musl"
-cmds[2]="cp target/x86_64-unknown-linux-musl/release/songs ."
-cmds[3]="mv songs songs_$versionNumber_x86_64-unknown-linux-musl"
+declare -a cmds=(
+ "git tag -a $versionNumber -m '$versionNumber'"
+ "cargo build -r --target x86_64-unknown-linux-musl"
+ "cp target/x86_64-unknown-linux-musl/release/songs ."
+ "mv songs songs_"$versionNumber"_x86_64-unknown-linux-musl"
+)
+for (( i=0; i<${#cmds[@]}; i++ ));
+do
+ echo "${cmds[$i]}"
+ bash -c "${cmds[$i]}"
+done