|
@@ -6,8 +6,8 @@ steps:
|
6
|
6
|
- name: versioning
|
7
|
7
|
image: node:12
|
8
|
8
|
commands:
|
9
|
|
- - export PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
10
|
|
- - export LATEST_VERSION=$(npm view rpclibrary | grep latest | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
|
9
|
+ - PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
|
10
|
+ - LATEST_VERSION=$(npm view rpclibrary | grep latest | head -1 | awk -F '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
|
11
|
11
|
- echo "${PACKAGE_VERSION}"
|
12
|
12
|
- echo "${LATEST_VERSION}"
|
13
|
13
|
- echo "${DRONE_BUILD_CREATED}"
|
|
@@ -15,12 +15,12 @@ steps:
|
15
|
15
|
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
|
16
|
16
|
- if [ "${PACKAGE_VERSION}" != "${LATEST_VERSION}" ]; \
|
17
|
17
|
then \
|
18
|
|
- git tag $PACKAGE_VERSION \
|
|
18
|
+ git tag "$PACKAGE_VERSION" \
|
19
|
19
|
git status \
|
20
|
20
|
git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git $PACKAGE_VERSION \
|
21
|
21
|
else \
|
22
|
22
|
echo 'Version ' \
|
23
|
|
- echo $LATEST_VERSION \
|
|
23
|
+ echo "$LATEST_VERSION" \
|
24
|
24
|
echo 'did not change. Don`t push tag to master' \
|
25
|
25
|
fi
|
26
|
26
|
|