We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0cfd4f commit 651ccbfCopy full SHA for 651ccbf
.etc/images/bootstrap/martor-preview.png
-25.6 KB
push.sh
@@ -1,11 +1,27 @@
1
#!/bin/bash
2
3
echo '';
4
+echo " a. development";
5
+echo " b. master";
6
+echo -n "[+] branch [a/B] ➜ ";
7
+read branch;
8
+
9
echo -n "[+] commit ➜ ";
10
read commit;
11
-if [ "$commit" ]; then
- git add .;
- git commit -m "$commit";
- git push -u origin master;
12
+if [ "$commit" ] && [ "$branch" ]; then
13
+ git add .;
14
+ git commit -m "$commit";
15
16
+ if [ "$branch" == 'b' ] || [ "$branch" == 'B' ]; then
17
+ git checkout master;
18
+ git push origin master;
19
+ else
20
+ git checkout development;
21
+ git push origin development;
22
+ fi
23
24
+ echo "[i] successfully pushed at" $(date);
25
+else
26
+ echo "[!] not pushed!";
27
fi
0 commit comments