-
Notifications
You must be signed in to change notification settings - Fork 2
Brew setup and sonar coverage setup #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4f8d854
brew: adding dev utils
pateash 06dd454
brew: adding dev utils
pateash 62b9950
brew: sonar coverage added
pateash be37557
brew: sonar coverage added
pateash f69c2c4
brew: sonar coverage added
pateash fd5f8fc
brew: sonar coverage added
pateash fbe5da9
brew: sonar coverage added
pateash bf2c521
brew: sonar coverage added
pateash 41f6076
brew: sonar coverage added
pateash 227fb69
brew: sonar coverage added
pateash 979cbad
brew: sonar coverage added
pateash 096c2a9
brew: sonar coverage added
pateash ecfd360
brew: sonar coverage added
pateash a291d9d
brew: sonar coverage added
pateash f6d873c
brew: sonar coverage added
pateash 025978d
brew: sonar coverage added
pateash 3038f56
brew: sonar coverage added
pateash f96d7e7
brew: sonar coverage added
pateash 1e5af02
brew: sonar coverage added
pateash a682160
brew: sonar coverage added
pateash 51813cc
brew: sonar coverage added
pateash bdf693c
brew: sonar coverage added
pateash 9c7d8de
brew: sonar coverage added
pateash 3094dfb
brew: sonar coverage added
pateash c4d28bd
brew: sonar coverage added
pateash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Homebrew formulae | ||
|
pateash marked this conversation as resolved.
|
||
| * Local testing | ||
|
pateash marked this conversation as resolved.
|
||
|
|
||
| ## create a local tap for testing and link formulae | ||
|
pateash marked this conversation as resolved.
|
||
| ```shell | ||
|
pateash marked this conversation as resolved.
|
||
| bash ./dev/brew.sh tap # this will create tap with latest source | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
pateash marked this conversation as resolved.
|
||
| ```shell | ||
| bash ./dev/brew.sh test | ||
| ``` | ||
|
|
||
| ## style | ||
|
pateash marked this conversation as resolved.
|
||
| ```shell | ||
| bash ./dev/brew.sh style | ||
| ``` | ||
|
|
||
|
|
||
| * Bumping version [more](https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md) | ||
| ```shell | ||
| brew bump-formula-pr --formula hckr | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| #!/bin/bash | ||
|
|
||
| SOURCE="/Users/ashishpatel/pateash/homebrew-core/Formula/h/hckr.rb" | ||
|
|
||
| #FLAGS="--debug --verbose" | ||
| FLAGS="--verbose" | ||
| function clean(){ | ||
| echo "Cleaning all caches" | ||
| brew cleanup $FLAGS | ||
| echo "=====================================" | ||
| } | ||
|
|
||
| function uninstall(){ | ||
| echo "Uninstalling if exists" | ||
| brew uninstall $FLAGS hckr | ||
| echo "=====================================" | ||
| } | ||
|
|
||
| function install(){ | ||
| echo "Installing from sources" | ||
| brew install $FLAGS --build-from-source $SOURCE | ||
| echo "=====================================" | ||
| } | ||
|
|
||
| function test(){ | ||
| echo "Testing hckr" | ||
| brew test $FLAGS hckr | ||
| echo "=====================================" | ||
| } | ||
|
|
||
| function audit(){ | ||
| echo "Audit hckr" | ||
| brew audit --strict $FLAGS hckr | ||
| echo "=====================================" | ||
|
|
||
| } | ||
|
|
||
| function style(){ | ||
| echo "Style hckr" | ||
| brew style $FLAGS $SOURCE | ||
| echo "=====================================" | ||
| } | ||
|
|
||
| function tap(){ | ||
| echo -e "Creating a new tap with latest formulae 'hckr.rb'\nAs the files are soft linked, we do not need run this again." | ||
| TAP_NAME="pateash/local" | ||
| TAP_DIR="/opt/homebrew/Library/Taps/pateash/homebrew-local/Formula/" | ||
| # removing tap if exists | ||
| brew untap $FLAGS $TAP_NAME | ||
| echo -e "Creating tap $TAP_NAME" | ||
| brew tap-new $FLAGS $TAP_NAME --no-git | ||
| brew tap-info $FLAGS $TAP_NAME | ||
| ln -s $SOURCE $TAP_DIR # copying tap | ||
| ls -la $TAP_DIR | ||
| brew tap-info $TAP_NAME # checking taps after moving formulae | ||
| echo "=====================================" | ||
| } | ||
| ### | ||
|
|
||
| CMD=$1 | ||
|
|
||
| COMMANDS="\n==========================\ntest - Run brew test \ninstall - Install from sources\nuninstall- Uninstall hckr\nclean - Clean cache\ntap - Create tap from latest sources\naudit - Run brew audit\nstyle - Run brew style" | ||
|
|
||
| if [ -z $CMD ]; then | ||
| echo -e "Please pass COMMAND, Please use $COMMANDS" | ||
| exit 1 | ||
| fi | ||
|
|
||
| case $CMD in | ||
| install) | ||
| install | ||
| ;; | ||
| uninstall) | ||
| uninstall | ||
| ;; | ||
| clean) | ||
| clean | ||
| ;; | ||
| audit) | ||
| audit | ||
| ;; | ||
| test) | ||
| test | ||
| ;; | ||
| tap) | ||
| tap | ||
| ;; | ||
| style) | ||
| style | ||
| ;; | ||
| checks) # run all checks | ||
| test | ||
| audit | ||
| style | ||
| ;; | ||
| *) | ||
| echo -e "Invalid command, Please use $COMMANDS" | ||
| exit 1 | ||
| esac | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.