| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #!/bin/bash | ||
| 1 | + #!/bin/sh | ||
| 2 | 2 | # Copyright (C) 2016 Gauvain Pocentek <gauvain@pocentek.net> | |
| 3 | 3 | # | |
| 4 | 4 | # This program is free software: you can redistribute it and/or modify | |
@@ -71,7 +71,7 @@ CONFIG=/tmp/python-gitlab.cfg | |||
| 71 | 71 | GITLAB() { gitlab --config-file "$CONFIG" "$@"; } | |
| 72 | 72 | GREEN='\033[0;32m' | |
| 73 | 73 | NC='\033[0m' | |
| 74 | - OK() { echo -e "${GREEN}OK${NC}"; } | ||
| 74 | + OK() { printf "${GREEN}OK${NC}\\n"; } | ||
| 75 | 75 | ||
| 76 | 76 | log "Waiting for gitlab to come online... " | |
| 77 | 77 | I=0 | |
@@ -81,7 +81,7 @@ while :; do | |||
| 81 | 81 | sleep 4 | |
| 82 | 82 | curl -s http://localhost:8080/users/sign_in 2>/dev/null \ | |
| 83 | 83 | | grep -q "GitLab Community Edition" && break | |
| 84 | - let I=I+5 | ||
| 84 | + I=$((I+5)) | ||
| 85 | 85 | [ "$I" -eq 120 ] && exit 1 | |
| 86 | 86 | done | |
| 87 | 87 | sleep 5 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #!/bin/bash | ||
| 1 | + #!/bin/sh | ||
| 2 | 2 | # Copyright (C) 2015 Gauvain Pocentek <gauvain@pocentek.net> | |
| 3 | 3 | # | |
| 4 | 4 | # This program is free software: you can redistribute it and/or modify | |
@@ -20,61 +20,61 @@ BUILD_TEST_ENV_AUTO_CLEANUP=true | |||
| 20 | 20 | ||
| 21 | 21 | set -e | |
| 22 | 22 | ||
| 23 | - echo -n "Testing project creation... " | ||
| 23 | + printf %s "Testing project creation... " | ||
| 24 | 24 | PROJECT_ID=$(GITLAB project create --name test-project1 \ | |
| 25 | 25 | | grep ^id: | cut -d' ' -f2) | |
| 26 | 26 | GITLAB project list | grep -q test-project1 | |
| 27 | 27 | OK | |
| 28 | 28 | ||
| 29 | - echo -n "Testing project update... " | ||
| 29 | + printf %s "Testing project update... " | ||
| 30 | 30 | GITLAB project update --id "$PROJECT_ID" --description "My New Description" | |
| 31 | 31 | OK | |
| 32 | 32 | ||
| 33 | - echo -n "Testing user creation... " | ||
| 33 | + printf %s "Testing user creation... " | ||
| 34 | 34 | USER_ID=$(GITLAB user create --email fake@email.com --username user1 \ | |
| 35 | 35 | --name "User One" --password fakepassword | grep ^id: | cut -d' ' -f2) | |
| 36 | 36 | OK | |
| 37 | 37 | ||
| 38 | - echo -n "Testing verbose output... " | ||
| 38 | + printf %s "Testing verbose output... " | ||
| 39 | 39 | GITLAB -v user list | grep -q avatar-url | |
| 40 | 40 | OK | |
| 41 | 41 | ||
| 42 | - echo -n "Testing CLI args not in output... " | ||
| 42 | + printf %s "Testing CLI args not in output... " | ||
| 43 | 43 | GITLAB -v user list | grep -qv config-file | |
| 44 | 44 | OK | |
| 45 | 45 | ||
| 46 | - echo -n "Testing adding member to a project... " | ||
| 46 | + printf %s "Testing adding member to a project... " | ||
| 47 | 47 | GITLAB project-member create --project-id "$PROJECT_ID" \ | |
| 48 | 48 | --user-id "$USER_ID" --access-level 40 >/dev/null 2>&1 | |
| 49 | 49 | OK | |
| 50 | 50 | ||
| 51 | - echo -n "Testing file creation... " | ||
| 51 | + printf %s "Testing file creation... " | ||
| 52 | 52 | GITLAB project-file create --project-id "$PROJECT_ID" \ | |
| 53 | 53 | --file-path README --branch-name master --content "CONTENT" \ | |
| 54 | 54 | --commit-message "Initial commit" >/dev/null 2>&1 | |
| 55 | 55 | OK | |
| 56 | 56 | ||
| 57 | - echo -n "Testing issue creation... " | ||
| 57 | + printf %s "Testing issue creation... " | ||
| 58 | 58 | ISSUE_ID=$(GITLAB project-issue create --project-id "$PROJECT_ID" \ | |
| 59 | 59 | --title "my issue" --description "my issue description" \ | |
| 60 | 60 | | grep ^id: | cut -d' ' -f2) | |
| 61 | 61 | OK | |
| 62 | 62 | ||
| 63 | - echo -n "Testing note creation... " | ||
| 63 | + printf %s "Testing note creation... " | ||
| 64 | 64 | GITLAB project-issue-note create --project-id "$PROJECT_ID" \ | |
| 65 | 65 | --issue-id "$ISSUE_ID" --body "the body" >/dev/null 2>&1 | |
| 66 | 66 | OK | |
| 67 | 67 | ||
| 68 | - echo -n "Testing branch creation... " | ||
| 68 | + printf %s "Testing branch creation... " | ||
| 69 | 69 | GITLAB project-branch create --project-id "$PROJECT_ID" \ | |
| 70 | 70 | --branch-name branch1 --ref master >/dev/null 2>&1 | |
| 71 | 71 | OK | |
| 72 | 72 | ||
| 73 | - echo -n "Testing branch deletion... " | ||
| 73 | + printf %s "Testing branch deletion... " | ||
| 74 | 74 | GITLAB project-branch delete --project-id "$PROJECT_ID" \ | |
| 75 | 75 | --name branch1 >/dev/null 2>&1 | |
| 76 | 76 | OK | |
| 77 | 77 | ||
| 78 | - echo -n "Testing project deletion... " | ||
| 78 | + printf %s "Testing project deletion... " | ||
| 79 | 79 | GITLAB project delete --id "$PROJECT_ID" | |
| 80 | 80 | OK | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - #!/bin/bash | ||
| 1 | + #!/bin/sh | ||
| 2 | 2 | # Copyright (C) 2015 Gauvain Pocentek <gauvain@pocentek.net> | |
| 3 | 3 | # | |
| 4 | 4 | # This program is free software: you can redistribute it and/or modify | |
| Back | FazBrowse Home | New Git URL |
0 commit comments