Skip to content

Commit

Permalink
Merge pull request #37 from andstor/feat/branch-failure
Browse files Browse the repository at this point in the history
v3.2.1
  • Loading branch information
andstor authored Apr 20, 2020
2 parents 37c634a + 2dba21c commit f78bae4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]

## [3.2.1] - 2020-04-21
### Fixed
- Fixed an error regarding creation of destination branches.

## [3.2.0] - 2020-04-18
### Added
- Create the destination branch (based on the default branch) if it doesn't exists.
Expand Down Expand Up @@ -38,7 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).

## 1.0.0 - 2019-07-09

[Unreleased]: https://github.com/andstor/copycat-action/compare/v3.2.0...HEAD
[Unreleased]: https://github.com/andstor/copycat-action/compare/v3.2.1...HEAD
[3.2.1]: https://github.com/andstor/copycat-action/compare/v3.2.0...v3.2.1
[3.2.0]: https://github.com/andstor/copycat-action/compare/v3.1.1...v3.2.0
[3.1.1]: https://github.com/andstor/copycat-action/compare/v3.1.0...v3.1.1
[3.1.0]: https://github.com/andstor/copycat-action/compare/v3.0.1...v3.1.0
Expand Down
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# @author André Storhaug <[email protected]>
# @date 2020-04-18
# @license MIT
# @version 3.2.0
# @version 3.2.1

set -o pipefail

Expand Down Expand Up @@ -115,12 +115,14 @@ if [ "$?" -ne 0 ]; then
echo >&2 "Cloning branch '$DST_BRANCH' in '$DST_REPO' failed"
echo >&2 "Falling back to default branch"
git clone --single-branch --depth 1 https://${PERSONAL_TOKEN}@github.com/${DST_REPO}.git
cd ${DST_REPO_NAME} || exit "$?"
echo >&2 "Creating branch '$DST_BRANCH'"
git checkout -b ${DST_BRANCH}
if [ "$?" -ne 0 ]; then
echo >&2 "Creation of Branch '$DST_BRANCH' failed"
exit 1
fi
cd ..
fi

if [ "$CLEAN" = "true" ]; then
Expand Down

0 comments on commit f78bae4

Please sign in to comment.