File tree Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Expand file tree Collapse file tree 1 file changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Stop at first error
4+ set -e
5+
6+ # Use version from changelog
7+ # version=$(head -n1 CHANGELOG.md|cut -d"v" -f2);
8+ version=$1
9+ echo " Releasing version $version " ;
10+
11+ # Ask for confirmation
12+ read -r -p " Are you sure? [y/N] " input
13+
14+ case $input in
15+ [yY][eE][sS]|[yY])
16+ echo " You say Yes"
17+ ;;
18+ [nN][oO]|[nN])
19+ echo " You say No"
20+ exit 1
21+ ;;
22+ * )
23+ echo " Invalid input..."
24+ exit 1
25+ ;;
26+ esac
27+
28+ # Ask for confirmation
29+ read -r -p " Create commit and bump package.json version? [y/N] " input
30+
31+ case $input in
32+ [yY][eE][sS]|[yY])
33+ echo " You say Yes"
34+ # Bump version in info.xml
35+ sed -i -E " s|^\t<version>.+</version>|\t<version>$version </version>|" appinfo/info.xml
36+
37+ # Add changed files to git
38+ # git add CHANGELOG.md
39+ git add appinfo/info.xml
40+
41+ # Bump npm version, commit and tag
42+ npm version -f $version
43+
44+ # Show the result
45+ git log -1 -p
46+
47+ # Add signoff
48+ git commit --amend -s
49+ ;;
50+ * )
51+ echo " You say No"
52+ ;;
53+ esac
54+
55+ # Ask for confirmation
56+ read -r -p " Tag and push? [y/N] " input
57+
58+ case $input in
59+ [yY][eE][sS]|[yY])
60+ echo " You say Yes"
61+ # Then manually:
62+ git tag v$version
63+ git push --tags
64+ # Create release on github
65+
66+ git push git@github.com:nextcloud-releases/ldap_write_support.git v$version
67+ # Create release on github
68+ ;;
69+ * )
70+ echo " You say No"
71+ ;;
72+ esac
73+
74+ echo https://github.com/nextcloud/ldap_write_support/tags
75+ echo https://github.com/nextcloud-releases/ldap_write_support/tags
76+ # https://github.com/nextcloud/ldap_write_support/releases/new?tag=v1.10.0
You can’t perform that action at this time.
0 commit comments