File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# Description: This is a script to update the version
3
- # Run it with `sh update.sh` and it will do the following:
3
+ # Run it with `sh update.sh <version> ` and it will do the following:
4
4
# 1. Update the `pkgver` in `PKGBUILD` to the latest version
5
5
# 2. Run `updpkgsums` to update the sha256 sums
6
6
# - If you don't have it installed, run `sudo pacman -S pacman-contrib`
10
10
# makepkg --printsrcinfo > .SRCINFO
11
11
# ```
12
12
# 4. Push changes to GitHub: `git push`
13
- # If you want to perform a dry run of this script run DRY_RUN=1 yarn release:prep
14
13
15
14
set -euo pipefail
16
15
@@ -26,11 +25,15 @@ main() {
26
25
ls
27
26
grep " pkgver=" PKGBUILD
28
27
CODE_SERVER_CURRENT_VERSION=$( grep " pkgver=" PKGBUILD | cut -d " =" -f2-)
29
- # Ask which version we should update to
30
- # In the future, we'll automate this and determine the latest version automatically
31
28
echo " Current version: ${CODE_SERVER_CURRENT_VERSION} "
32
29
33
- read -r -p " What version of code-server do you want to update to?" $' \n ' CODE_SERVER_VERSION_TO_UPDATE
30
+ CODE_SERVER_VERSION_TO_UPDATE=${1:- " " }
31
+
32
+ if [ " $CODE_SERVER_VERSION_TO_UPDATE " == " " ]; then
33
+ echo " Please call this script with the version to update to."
34
+ echo " i.e. 4.5.2"
35
+ exit 1
36
+ fi
34
37
35
38
echo -e " Great! We'll update to $CODE_SERVER_VERSION_TO_UPDATE \n"
36
39
You can’t perform that action at this time.
0 commit comments