Update script: get latest version from git

This commit is contained in:
Marcel Kapfer 2020-03-29 13:25:35 +02:00
parent 48b4a53f78
commit c09fd499a0
2 changed files with 7 additions and 4 deletions

View file

@ -94,7 +94,9 @@ To update the version follow these steps. Replace all instances of `[year].[majo
### Automatically do steps 2 to 12 ### Automatically do steps 2 to 12
Run `./update-new-version.sh 2017.3 [year].[major].[minor]` Run `./update-new-version.sh "$new-version"`
Where `$new-version` is in the format `[year].[major].[minor]`.
### Setting up the build environment ### Setting up the build environment

View file

@ -6,8 +6,9 @@ PACKAGE="intellij-idea-community"
DISTRIBUTION="disco" DISTRIBUTION="disco"
main() { main() {
old="$1" last_tag=$(git describe --tags)
new="$2" old="${last_tag#?}"
new="$1"
name="$(git config --get user.name)" name="$(git config --get user.name)"
email="$(git config --get user.email)" email="$(git config --get user.email)"
@ -36,4 +37,4 @@ main() {
# sudo dpkg -i "$PACKAGE"_"$new"-1_all.deb # sudo dpkg -i "$PACKAGE"_"$new"-1_all.deb
} }
main "$1" "$2" main "$1"