@jswork/ushell-module-git 1.0.10 → 1.0.12

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.
package/index.sh CHANGED
@@ -72,6 +72,7 @@ alias ggg='gaa && gcm "wip" && gp';
72
72
  alias gcd=". ${ROOT_PATH}/modules/01-gcd.sh";
73
73
  alias ggt="${ROOT_PATH}/modules/03-quick-tag.sh";
74
74
  alias git-reset="${ROOT_PATH}/modules/04-reset-git.sh";
75
+ alias git-clean="${ROOT_PATH}/modules/06-git-clean.sh";
75
76
 
76
77
 
77
78
  # check git repo size
package/modules/01-gcd.sh CHANGED
@@ -2,16 +2,10 @@
2
2
  GIT_URL=$1;
3
3
  dir=`basename $GIT_URL .git`;
4
4
  orgname=`echo $GIT_URL | awk -F [:/] '{print$2}'`;
5
- hub=`echo $GIT_URL | awk -F [:/] '{print$1}'`;
6
5
 
7
- # if is hub is saybot
8
- if [ $hub == 'git@git.saybot.net' ]; then
9
- orgname='saybot';
10
- fi
11
-
12
- # A special case for `afeiship` org.
13
- if [ $orgname == 'afeiship' ]; then
14
- orgname='github';
6
+ # A special case for nono `aric-` org.
7
+ if [[ $orgname != "aric-"* ]]; then
8
+ orgname="github";
15
9
  fi
16
10
 
17
11
  localdir="$HOME/$orgname/$dir";
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env bash
2
+
3
+ #!/bin/bash
4
+
5
+ # Delete local tags
6
+ git tag -l | xargs git tag -d
7
+
8
+ # Delete remote tags
9
+ git ls-remote --tags | awk '{print $2}' | sed 's/refs\/tags\///' | xargs -n 1 git push --delete origin
10
+
11
+ # Delete remote releases
12
+ gh release list | awk '{print $2}' | xargs -n 1 gh release delete --yes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/ushell-module-git",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Unix like shell module for git.",
5
5
  "main": "index.sh",
6
6
  "repository": {