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 92aee98 commit 48b76f3Copy full SHA for 48b76f3
release.sh
@@ -0,0 +1,32 @@
1
+#!/bin/bash
2
+
3
+# Get new tags from remote
4
+git fetch --tags
5
+# Get latest tag name
6
+latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
7
+# Parse v1.2.3 into array
8
+latestTag=${latestTag//./ }
9
+latestTag=${latestTag/v/}
10
+version=($latestTag)
11
+# Calculate new version
12
+case $1 in
13
+ major)
14
+ version[0]=$((version[0]+1))
15
+ version[1]=0
16
+ version[2]=0
17
+ ;;
18
+ minor)
19
+ version[1]=$((version[1]+1))
20
21
22
+ *) # build
23
+ version[2]=$((version[2]+1))
24
25
+esac
26
+# Constuct new tag
27
+newTag=v${version[0]}.${version[1]}.${version[2]}
28
+# Build all files
29
+php install.php
30
+php build.php
31
32
+gh release create $newTag api.php api.include.php
0 commit comments