This repository was archived by the owner on Dec 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-37
lines changed
packages/MonorepoBuilder/packages/Split/bash Expand file tree Collapse file tree 1 file changed +7
-37
lines changed Original file line number Diff line number Diff line change 5151
5252COMMAND=
5353SPLITS=
54- REPO_URL=
54+ REPO_URL=" .git "
5555WORK_DIR=" ${PWD} /.subsplit"
5656HEADS=
5757NO_HEADS=
@@ -78,24 +78,10 @@ subsplit_main()
7878 esac
7979 done
8080
81- COMMAND=" $1 "
81+ if [ $# -lt 1 ]; then die " publish command requires splits to be passed as first argument" ; fi
82+ SPLITS=" $1 "
8283 shift
83-
84- case " $COMMAND " in
85- init)
86- if [ $# -lt 1 ]; then die " init command requires url to be passed as first argument" ; fi
87- REPO_URL=" $1 "
88- shift
89- subsplit_init
90- ;;
91- publish)
92- if [ $# -lt 1 ]; then die " publish command requires splits to be passed as first argument" ; fi
93- SPLITS=" $1 "
94- shift
95- subsplit_publish
96- ;;
97- * ) die " Unknown command '$COMMAND '" ;;
98- esac
84+ subsplit_publish
9985}
10086
10187say ()
@@ -108,26 +94,10 @@ fatal()
10894 RC=${1:- 1}
10995 shift
11096 say " ${@:-## Error occurs} "
111- popd > /dev/null
97+ # popd >/dev/null
11298 exit $RC
11399}
114100
115-
116- subsplit_require_work_dir ()
117- {
118- if [ ! -e " $WORK_DIR " ]
119- then
120- die " Working directory not found at ${WORK_DIR} ; please run init first"
121- fi
122-
123- if [ -n " $VERBOSE " ];
124- then
125- echo " ${DEBUG} pushd \" ${WORK_DIR} \" >/dev/null"
126- fi
127-
128- pushd " $WORK_DIR " > /dev/null
129- }
130-
131101subsplit_init ()
132102{
133103 if [ -e " $WORK_DIR " ]
@@ -147,7 +117,7 @@ subsplit_init()
147117
148118subsplit_publish ()
149119{
150- subsplit_require_work_dir
120+ subsplit_init
151121
152122 if [ -z " $HEADS " ] && [ -z " $NO_HEADS " ]
153123 then
@@ -325,4 +295,4 @@ subsplit_publish()
325295 popd > /dev/null
326296}
327297
328- subsplit_main " $@ "
298+ subsplit_main " $@ "
You can’t perform that action at this time.
0 commit comments