-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shogun
committed
Nov 5, 2016
1 parent
e64d4ee
commit 0990d9f
Showing
9 changed files
with
47 additions
and
84 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Carthage | ||
Frameworks | ||
.history | ||
alfred-chrome | ||
|
Binary file not shown.
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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,36 @@ | ||
#/usr/bin/env ruby | ||
# | ||
# This file is part of alfred-chrome. Copyright (C) 2016 and above Shogun <shogun@cowtech.it>. | ||
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. | ||
# | ||
|
||
require "json" | ||
|
||
desc "Build the main executable." | ||
task :build do | ||
orig = Dir.pwd | ||
Dir.chdir("src/alfred-chrome/") | ||
system("swift build -c release") | ||
FileUtils.mv(".build/release/alfred-chrome", "../..", verbose: true) | ||
Dir.chdir(orig) | ||
end | ||
|
||
desc "Cleans the build directories." | ||
task :clean do | ||
FileUtils.rm_rf(["alfred-chrome", "src/alfred-chrome/Sources/.build"], verbose: true) | ||
end | ||
|
||
desc "Install the executable in the workflow directory for distribution." | ||
task :install => :build do | ||
# Detecting the right workflow | ||
workflow = Dir.glob(File.expand_path("~/Library/Application\ Support/Alfred\ 3/Alfred.alfredpreferences/workflows/*/info.plist")).find { |plist| | ||
begin | ||
JSON.parse(`plutil -convert json -o - "#{plist}"`)["bundleid"] == "it.cowtech.alfred.chrome" | ||
rescue | ||
end | ||
} | ||
|
||
FileUtils.cp("alfred-chrome", File.dirname(workflow), verbose: true) | ||
end | ||
|
||
task default: ["build"] |
This file was deleted.
Oops, something went wrong.