DEADSOFTWARE

Add attribution to so script
authorfredboy <fredboy@protonmail.com>
Wed, 17 Apr 2024 05:27:03 +0000 (12:27 +0700)
committerfredboy <fredboy@protonmail.com>
Wed, 17 Apr 2024 05:32:28 +0000 (12:32 +0700)
COPYING
gen-changelog.sh
make-release.sh
require-celan-work-tree.sh [new file with mode: 0644]

diff --git a/COPYING b/COPYING
index 37400b601b719a895b831164d55737df9ddd37b2..6d0eb3acdafa494b776a3a16163fa4b22458a294 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -3,3 +3,5 @@ This game is distributed under MIT License (see LICENSE).
 Textures used in this game:
 Pixel Perfection by XSSheep is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
 https://creativecommons.org/licenses/by-sa/4.0/
+
+Some scripts from stack overflow are distributed under applicable licenses
index f2959c19db98b655fcabe006c8482c3bb9649a1a..5c6007e9759227e772bd59a762915f9ced5c3a1b 100755 (executable)
@@ -1,5 +1,9 @@
 #!/usr/bin/env bash
 
+# Waku-2 CC BY-SA 3.0
+# https://stackoverflow.com/a/46033999
+# https://creativecommons.org/licenses/by-sa/3.0/
+
 previous_tag=0
 i=0
 for current_tag in $(git tag --sort=-creatordate)
index e593734017b80deaf9c6ac9f3a986206977f65f6..5e3f71a9e1a0c79ea7cfbb523a22deec02d2ed48 100755 (executable)
@@ -1,40 +1,11 @@
 #!/usr/bin/env bash
 
-require_clean_work_tree() {
-    # Update the index
-    git update-index -q --ignore-submodules --refresh
-    err=0
-
-    # Disallow unstaged changes in the working tree
-    if ! git diff-files --quiet --ignore-submodules --
-    then
-        echo >&2 "cannot $1: you have unstaged changes."
-        git diff-files --name-status -r --ignore-submodules -- >&2
-        err=1
-    fi
-
-    # Disallow uncommitted changes in the index
-    if ! git diff-index --cached --quiet HEAD --ignore-submodules --
-    then
-        echo >&2 "cannot $1: your index contains uncommitted changes."
-        git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
-        err=1
-    fi
-
-    if [ $err = 1 ]
-    then
-        echo >&2 "Please commit or stash them."
-        exit 1
-    fi
-}
-
-
 if [[ ! $1 ]]; then
   echo "usage: $0 versionName"
   exit
 fi
 
-require_clean_work_tree "$0"
+./require_clean_work_tree "$0"
 
 release_dir="release-$1"
 
diff --git a/require-celan-work-tree.sh b/require-celan-work-tree.sh
new file mode 100644 (file)
index 0000000..cdd7e75
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# VonC CC BY-SA 4.0
+# https://stackoverflow.com/a/3879077
+# https://creativecommons.org/licenses/by-sa/4.0/
+
+    # Update the index
+    git update-index -q --ignore-submodules --refresh
+    err=0
+
+    # Disallow unstaged changes in the working tree
+    if ! git diff-files --quiet --ignore-submodules --
+    then
+        echo >&2 "cannot $1: you have unstaged changes."
+        git diff-files --name-status -r --ignore-submodules -- >&2
+        err=1
+    fi
+
+    # Disallow uncommitted changes in the index
+    if ! git diff-index --cached --quiet HEAD --ignore-submodules --
+    then
+        echo >&2 "cannot $1: your index contains uncommitted changes."
+        git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2
+        err=1
+    fi
+
+    if [ $err = 1 ]
+    then
+        echo >&2 "Please commit or stash them."
+        exit 1
+    fi