Skip to content

Commit

Permalink
chore: create_release 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Jul 29, 2023
1 parent a08d7dd commit 3635122
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions create_release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# rust create_release
# v0.2.7
# v0.3.0

STAR_LINE='****************************************'
CWD=$(pwd)
Expand Down Expand Up @@ -50,9 +50,7 @@ update_patch () {

# Get the url of the github repo, strip .git from the end of it
get_git_remote_url() {
REMOTE_ORIGIN=$(git config --get remote.origin.url)
TO_REMOVE=".git"
GIT_REPO_URL="${REMOTE_ORIGIN//$TO_REMOVE}"
GIT_REPO_URL="$(git config --get remote.origin.url | sed 's/\.git$//')"
}

# Check that git status is clean
Expand Down Expand Up @@ -131,7 +129,7 @@ update_version_number_in_files () {
# create new semver version based on user input
# Set MAJOR MINOR PATCH
check_tag () {
LATEST_TAG=$(git describe --tags --abbrev=0 --always)
LATEST_TAG=$(git describe --tags "$(git rev-list --tags --max-count=1)")
echo -e "\nCurrent tag: ${PURPLE}${LATEST_TAG}${RESET}\n"
echo -e "${YELLOW}Choose new tag version:${RESET}\n"
if [[ $LATEST_TAG =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]
Expand Down

0 comments on commit 3635122

Please sign in to comment.