Skip to content

build.sh 명령어 문제 확인요망 #108

@thomasJang

Description

@thomasJang
#!/usr/bin/env bash

LOG=`git log --pretty=oneline --abbrev-commit -1`

rm -rf .subsplit

case "$LOG" in
  *MAJOR@*) echo "Major Version"; VERSION_TYPE="MAJOR";;
  *MINOR@*) echo "Minor version"; VERSION_TYPE="MINOR";;
  *PATCH@*) echo "Patch Version"; VERSION_TYPE="PATCH";;
esac

if [ $VERSION_TYPE ]
then
    git checkout master

    git pull origin master

    case "$VERSION_TYPE" in
      *MAJOR*) VERSION=$(npm version major --force);;
      *MINOR*) VERSION=$(npm version minor --force);;
      *PATCH*) VERSION=$(npm version patch --force);;
    esac

    VERSION=$(echo $VERSION | cut -c 2-)

    echo "VERSION : " $VERSION

    echo "START VERSION UP PROCESS"

    npm install && gulp version

    git add *

    echo "Git Commit & Push"

    git commit -m "$VERSION RELEASED" && git pull origin master && git push origin master
fi

에서 VERSION_TYPE 이 없는 상황이 나오고 있습니다.
도움이 필요합니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions