Skip to content

Commit

Permalink
Rewritten in Swift 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shogun committed Nov 5, 2016
1 parent e64d4ee commit 0990d9f
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 84 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Carthage
Frameworks
.history
alfred-chrome

Binary file modified Alfred Chrome.alfredworkflow
Binary file not shown.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 2.0.1 / 2016-11-05

* Allow profiles with spaces
* Make url optional
* Rewritten in Swift 3

### 2.0.0 / 2016-09-04

* Update for Alfred 3
Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

3 changes: 0 additions & 3 deletions Cartfile.resolved

This file was deleted.

17 changes: 0 additions & 17 deletions Makefile

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The recognized commands are:
* `chrome-canary [as $USER] [[in] incognito] $URL`
* `canary [as $USER] [[in] incognito] $URL`

Where
Where

* each part between square brackets is optional.
* `$URL` is the URL you want to open.
Expand All @@ -26,6 +26,8 @@ Where

Double click (or open in Alfred settings) the `Alfred Chrome.alfredworkflow` file.

This workflow is for Alfred 3 only therefore it works on macOS 10.9+ (Mavericks and following).

## Uninstallation

Remove the workflow via Alfred settings.
Expand Down
36 changes: 36 additions & 0 deletions Rakefile
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"]
60 changes: 0 additions & 60 deletions alfred-chrome.swift

This file was deleted.

0 comments on commit 0990d9f

Please sign in to comment.