Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #106 from viniciusramosdefaria/fix/changelog
Browse files Browse the repository at this point in the history
[FIX] changelog
  • Loading branch information
ernelio authored May 27, 2020
2 parents f29e52b + a81c621 commit 2c4d0c3
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ build-circle:
release:
git config --global user.email "$(GIT_EMAIL)"
git config --global user.name "$(GIT_NAME)"
git tag -a $(RELEASE_VERSION) -m "$(RELEASE_VERSION)"
git push $(GIT_REMOTE) $(RELEASE_VERSION)
curl --user $(GIT_USERNAME):$(GIT_PASSWORD) -X POST https://api.github.com/repos/ZupIT/ritchie-cli/pulls -H 'Content-Type: application/json' -d '{ "title": "Release $(RELEASE_VERSION) merge", "body": "Release $(RELEASE_VERSION) merge with master", "head": "release-$(RELEASE_VERSION)", "base": "master" }'
gem install github_changelog_generator
github_changelog_generator -u zupit -p ritchie-cli --token $(GIT_PASSWORD) --enhancement-labels feature,Feature --exclude-labels duplicate,question,invalid,wontfix
git add .
git commit --allow-empty -m "[ci skip] release"
git push $(GIT_REMOTE) HEAD:release-$(RELEASE_VERSION)
git tag -a $(RELEASE_VERSION) -m "$(RELEASE_VERSION)"
git push $(GIT_REMOTE) $(RELEASE_VERSION)
curl --user $(GIT_USERNAME):$(GIT_PASSWORD) -X POST https://api.github.com/repos/ZupIT/ritchie-cli/pulls -H 'Content-Type: application/json' -d '{ "title": "Release $(RELEASE_VERSION) merge", "body": "Release $(RELEASE_VERSION) merge with master", "head": "release-$(RELEASE_VERSION)", "base": "master" }'

delivery:
ifneq "$(BUCKET)" ""
Expand Down
11 changes: 7 additions & 4 deletions bucket.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh

if expr "$VERSION" : 'qa-*' >/dev/null; then echo "ritchie-cli-bucket234376412767550"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then echo "ritchie-cli-bucket152849730126474"
else echo ""
fi
if expr "$VERSION" : 'qa-*' >/dev/null; then
echo "ritchie-cli-bucket234376412767550"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then
echo "ritchie-cli-bucket152849730126474"
else
echo ""
fi
5 changes: 3 additions & 2 deletions credentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ if expr "$CIRCLE_BRANCH" : 'qa' >/dev/null; then
elif expr "$CIRCLE_BRANCH" : '^release-.*' >/dev/null; then
export AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID_PROD"
export AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY_PROD"
else echo ""
fi
else
echo ""
fi
9 changes: 6 additions & 3 deletions ritchie_env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh

if expr "$VERSION" : 'qa-*' >/dev/null; then echo "qa"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then echo "prod"
else echo ""
if expr "$VERSION" : 'qa-*' >/dev/null; then
echo "qa"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then
echo "prod"
else
echo ""
fi
9 changes: 6 additions & 3 deletions ritchie_server.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/sh

if expr "$VERSION" : 'qa-*' >/dev/null; then echo "https://ritchie-server.itiaws.dev"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then echo "https://ritchie-server.zup.io"
else echo ""
if expr "$VERSION" : 'qa-*' >/dev/null; then
echo "https://ritchie-server.itiaws.dev"
elif expr "$VERSION" : '^[0-9]\+' >/dev/null; then
echo "https://ritchie-server.zup.io"
else
echo ""
fi
13 changes: 9 additions & 4 deletions version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash

if expr "$CIRCLE_BRANCH" : 'qa' >/dev/null; then export RELEASE_VERSION="qa-${CIRCLE_BUILD_NUM}"
elif expr "$CIRCLE_BRANCH" : '^release-.*' >/dev/null; then export RELEASE_VERSION=$(echo "$CIRCLE_BRANCH"| cut -d '-' -f 2-)
else echo ""
fi
if expr "$CIRCLE_BRANCH" : 'qa' >/dev/null; then
export RELEASE_VERSION="qa-${CIRCLE_BUILD_NUM}"
elif expr "$CIRCLE_BRANCH" : 'fix/changelog' >/dev/null; then
export RELEASE_VERSION="1.0.0.1"
elif expr "$CIRCLE_BRANCH" : '^release-.*' >/dev/null; then
export RELEASE_VERSION=$(echo "$CIRCLE_BRANCH" | cut -d '-' -f 2-)
else
echo ""
fi

0 comments on commit 2c4d0c3

Please sign in to comment.