Skip to content

Commit

Permalink
Merge pull request #156 from varp/master
Browse files Browse the repository at this point in the history
Improved Brew search algorithm and OneUpdater
  • Loading branch information
jeffbyrnes authored Feb 15, 2022
2 parents b4f9dc7 + 8872f70 commit 39aa20e
Show file tree
Hide file tree
Showing 9 changed files with 3,327 additions and 21 deletions.
46 changes: 36 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
.PHONY: dist clean
.PHONY: dist clean updateInfoPlist copyIcons buildWorkflow linkSourceFoldersToWorkflow

distDir=./dist


dist: | @composer @copy
dist: | composer copySources copyIcons
clean:
rm -rf $(distDir)/*

@composer:

composer:
rm -rf vendor
composer install -v -o --no-dev

@copy:
copySources:
$(shell [ ! -d "$(distDir)" ] && mkdir -p "$(distDir)")
cp -frv bin dist/
cp -frv src dist/
cp -fv composer.* dist/
cp -frv icon-cache dist/
cp -frv vendor dist/
cp -frv bin $(distDir)
cp -frv src $(distDir)
cp -fv composer.* $(distDir)
cp -frv icon-cache $(distDir)
cp -frv vendor $(distDir)

updateInfoPlist:
-[[ "${ALFRED_PKGMAN_WORKFLOW_DIR}" == "" ]] && { echo "ALFRED_PKGMAN_WORKFLOW_DIR is not set! Aborting!"; exit 1; }
cp -fv "${ALFRED_PKGMAN_WORKFLOW_DIR}"/info.plist .

copyIcons:
-[[ "${ALFRED_PKGMAN_WORKFLOW_DIR}" == "" ]] && { echo "ALFRED_PKGMAN_WORKFLOW_DIR is not set! Aborting!"; exit 1; }
find "${ALFRED_PKGMAN_WORKFLOW_DIR}" -type f -name "*.png" -depth 1 -exec cp -fv {} $(distDir) \;

buildWorkflow: | dist
mkdir -p $(distDir)/"Package Managers.alfredworkflow"
find $(distDir) -type d ! -name "Package Managers.alfredworkflow" -depth 1 -exec cp -rvf {} $(distDir)/"Package Managers.alfredworkflow" \;
find $(distDir) -type f ! -name "Package Managers.alfredworkflow" -depth 1 -exec cp -vf {} $(distDir)/"Package Managers.alfredworkflow" \;
cp -vf info.plist $(distDir)/"Package Managers.alfredworkflow"

linkSourceFoldersToWorkflow:
-[[ "${ALFRED_PKGMAN_WORKFLOW_DIR}" == "" ]] && { echo "ALFRED_PKGMAN_WORKFLOW_DIR is not set! Aborting!"; exit 1; }

-[ -d "${ALFRED_PKGMAN_WORKFLOW_DIR}/bin" ] && mv -v "${ALFRED_PKGMAN_WORKFLOW_DIR}/bin" "${ALFRED_PKGMAN_WORKFLOW_DIR}/bin.bak"
ln -vsfF $(PWD)/bin "${ALFRED_PKGMAN_WORKFLOW_DIR}"

-[ -d "${ALFRED_PKGMAN_WORKFLOW_DIR}/src" ] && mv -v "${ALFRED_PKGMAN_WORKFLOW_DIR}/src" "${ALFRED_PKGMAN_WORKFLOW_DIR}/src.bak"
ln -vsfF $(PWD)/src "${ALFRED_PKGMAN_WORKFLOW_DIR}"

-[ -d "${ALFRED_PKGMAN_WORKFLOW_DIR}/vendor" ] && mv -v "${ALFRED_PKGMAN_WORKFLOW_DIR}/vendor" "${ALFRED_PKGMAN_WORKFLOW_DIR}/vendor.bak"
ln -vsfF $(PWD)/vendor "${ALFRED_PKGMAN_WORKFLOW_DIR}"
Binary file modified Package Managers.alfredworkflow
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Quick package/plugin/component (repo) lookup for your favourite package managers
* `apm {query}`: [Atom Packages](https://atom.io)
* `apt-get {query}`: [Ubuntu Packages](https://apps.ubuntu.com)
* `bower {query}`: [Bower Components](http://bower.io) for JavaScript
* `brew {query}`: [Homebrew Plugins](http://braumeister.org)
* `brew {query}`: [Homebrew Forumale/Cask](http://brew.sh)
* `chef {query}`: [Chef Cookbooks](https://supermarket.chef.io)
* `cocoa {query}`: CocoaPods can be upgraded to CocoaDocs by changing `$apple_docs` to true in the script.
* `composer {query}`: PHP [Composer Packages](https://packagist.org)
Expand Down
Binary file added icon-cache/brew-cask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon-cache/brew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified icon-src/brew.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 39aa20e

Please sign in to comment.