Twenga/twgit

Mac problems with twgit scripts

oversanne opened this issue · 5 comments

On mac, we encountered some problems using twgit:

Here using

  • git version 2.3.2 (Apple Git-55)
  • bash : GNU bash, version 4.3.33(1)-release (x86_64-apple-darwin14.1.0)
12:07 lafourchette@Juliens-MacBook-Pro ~/Developer/iOS(release/6.3.0) $ twgit feature merge-into-release MOB-426
Check clean working tree...
git# git fetch --prune origin
Check remote release...
Check remote feature...
shell# twgit feature start MOB-426
/Users/lafourchette/Developer/twgit/conf/twgit-dist.sh: line 107: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/twgit: line 70: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/conf/twgit.sh: line 104: error.bold: syntax error: invalid arithmetic operator (error token is ".bold")
/Users/lafourchette/Developer/twgit/inc/coloredUI.inc.sh: line 65: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 31: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 32: 1a2e1f1r1t1u: value too great for base (error token is "1a2e1f1r1t1u")
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 225: autoupdate: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 226: assert_git_configured: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 227: assert_connectors_well_configured: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 189: guess_dyslexia: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 213: guess_dyslexia: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 220: assert_git_repository: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_feature.inc.sh: line 255: clean_prefixes: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_feature.inc.sh: line 257: start_simple_branch: command not found

git# git pull origin feature/MOB-426
From github.com:lafourchette/lafourchette-iphone
 * branch            feature/MOB-426 -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 lafourchette-ios/AppDelegate.h                     |   2 +-
 lafourchette-ios/AppDelegate.m                     | 160 ++++++++++++---------
 lafourchette-ios/Classes/LFBrand/LFBrandManager.h  |   2 +
 lafourchette-ios/Classes/LFBrand/LFBrandManager.m  |  48 ++++---
 .../Common/AlertView/LFAlertErrorViewController.m  |   2 +-
 .../Controller/Home/LFHomeViewController.h         |   2 +-
 .../Controller/Home/LFHomeViewController.m         |   9 +-
 .../LFViewPagerControllerViewController.h          |   4 +
 .../LFViewPagerControllerViewController.m          |  53 ++++++-
 .../app/HomeBundle/Behavior/HomeTabBehavior.h      |   3 +
 .../app/HomeBundle/Behavior/HomeTabBehavior.m      |   8 ++
 .../app/HomeBundle/Interface/HomeInterface.h       |   2 +
 .../app/HomeBundle/Interface/HomeInterface.m       |   8 ++
 .../xcschemes/lafourchette (preprod).xcscheme      |   4 +-
 14 files changed, 212 insertions(+), 95 deletions(-)
shell# twgit release start
/Users/lafourchette/Developer/twgit/conf/twgit-dist.sh: line 107: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/twgit: line 70: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/conf/twgit.sh: line 104: error.bold: syntax error: invalid arithmetic operator (error token is ".bold")
/Users/lafourchette/Developer/twgit/inc/coloredUI.inc.sh: line 65: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 31: declare: -A: invalid option
declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 32: 1a2e1f1r1t1u: value too great for base (error token is "1a2e1f1r1t1u")
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 225: autoupdate: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 226: assert_git_configured: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 227: assert_connectors_well_configured: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 189: guess_dyslexia: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 213: guess_dyslexia: command not found
/Users/lafourchette/Developer/twgit/inc/dyslexia.inc.sh: line 220: assert_git_repository: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 154: clean_prefixes: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 158: assert_clean_working_tree: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 159: process_fetch: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 160: assert_tag_exists: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 162: get_current_release_in_progress: command not found
/Users/lafourchette/Developer/twgit/inc/twgit_release.inc.sh: line 171: get_next_version: command not found
Release: release/
/Users/lafourchette/Developer/twgit/inc/coloredUI.inc.sh: line 76: question.header: syntax error: invalid arithmetic operator (error token is ".header")

Hi,

It looks like a problem with your bash version.
Are you sure twgit use the bash version GNU bash, version 4.3.33(1)-release?

Type this command /usr/bin/env bash --version , you should see the version used by twgit.

Hello, see #156.

/usr/bin/env bash --version give the right version of bash, but you need to find out the path to the bash with which bash

I'm using the latest Bash version below and get the same error when merging a feature branch into a release:

GNU bash, version 5.0.0(1)-release (x86_64-apple-darwin18.2.0)

Are there any known issues with the 5.0.0 version?
If so is there a solution?

Thanks in advance.

Same error
GNU bash, version 5.0.3(1)-release (x86_64-apple-darwin18.2.0)