@stream44.studio/dco 0.3.0-rc.7 → 0.3.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/commit.sh +5 -3
  2. package/dco.sh +25 -1
  3. package/package.json +3 -3
package/commit.sh CHANGED
@@ -456,11 +456,13 @@ main() {
456
456
  # If git arguments were provided, run git commit with --signoff
457
457
  if [[ ${#git_args[@]} -gt 0 ]]; then
458
458
  verbose_log "Running git commit with signoff and args: ${git_args[*]}"
459
- local sign_args=()
459
+ local config_args=()
460
+ local commit_args=()
460
461
  if [[ -n "$SIGNING_KEY" ]]; then
461
- sign_args+=(-c 'gpg.format=ssh' -c "user.signingkey=$SIGNING_KEY" --gpg-sign)
462
+ config_args+=(-c 'gpg.format=ssh' -c "user.signingkey=$SIGNING_KEY")
463
+ commit_args+=(--gpg-sign)
462
464
  fi
463
- git_commit_with_sign --signoff "${sign_args[@]}" "${git_args[@]}"
465
+ git "${config_args[@]}" commit --signoff "${commit_args[@]}" "${git_args[@]}"
464
466
  fi
465
467
  }
466
468
 
package/dco.sh CHANGED
@@ -10,7 +10,31 @@
10
10
 
11
11
  set -e
12
12
 
13
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
+ function _resolveSelfDir {
14
+ local SOURCE="$1"
15
+ local DIR=""
16
+ if [[ $SOURCE != /* ]]; then
17
+ SOURCE="$(cd "$(dirname "$SOURCE")" && pwd)/$(basename "$SOURCE")"
18
+ fi
19
+ while [[ -h "$SOURCE" ]]; do
20
+ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
21
+ SOURCE="$(readlink "$SOURCE")"
22
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
23
+ done
24
+ DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
25
+ echo "${DIR}"
26
+ }
27
+
28
+ if [[ -n "${BASH_SOURCE[0]}" ]]; then
29
+ _script_path="${BASH_SOURCE[0]}"
30
+ elif [[ -n "${(%):-%x}" ]]; then
31
+ _script_path="${(%):-%x}"
32
+ else
33
+ echo "ERROR: Cannot determine script location" >&2
34
+ exit 1
35
+ fi
36
+
37
+ SCRIPT_DIR="$(_resolveSelfDir "$_script_path")"
14
38
 
15
39
  # Default subcommand is 'commit'
16
40
  SUBCOMMAND="${1:-commit}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream44.studio/dco",
3
- "version": "0.3.0-rc.7",
3
+ "version": "0.3.0-rc.9",
4
4
  "description": "Developer Certificate of Origin (DCO) tools for signing & verifying.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -28,8 +28,8 @@
28
28
  "validate": "./validate.sh"
29
29
  },
30
30
  "dependencies": {
31
- "@stream44.studio/encapsulate": "^0.4.0-rc.8",
32
- "t44": "^0.4.0-rc.7"
31
+ "@stream44.studio/encapsulate": "^0.4.0-rc.9",
32
+ "t44": "^0.4.0-rc.8"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/bun": "^1.3.4",