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

[FIX] changelog #106

Merged
merged 7 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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