Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Atom Gitkraken Plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Sheogorath
Atom Gitkraken Plugin
Commits
9376c103
Verified
Commit
9376c103
authored
7 years ago
by
Sheogorath
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://github.com/b3ni/atom-gitkraken
into fix/merge-conflict
parents
eec72378
c278375e
Branches
fix/merge-conflict
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
index.coffee
+32
-12
32 additions, 12 deletions
index.coffee
package.json
+2
-1
2 additions, 1 deletion
package.json
with
34 additions
and
13 deletions
index.coffee
+
32
−
12
View file @
9376c103
...
...
@@ -55,18 +55,10 @@ module.exports =
#-------------------------------------------------------------------------------
open
:
({
path
})
->
if
@
config
.
get
'singleInstance'
exec
"pkill
GitKraken
; sleep .1 && open -Fb
#{
@
id
}
--args -p '
#{
path
}
'"
#, @timeout
if
atom
.
config
.
get
'
gitkraken.
singleInstance'
@
execGitKraken
Single
path
else
projects
=
{}
try
projects
=
require
@
tmp
execSync
"ps
#{
projects
[
path
]
}
| grep -q GitKraken &&
open -b
#{
@
id
}
--args -p '
#{
path
}
'"
catch
pid
=
execSync
"open -nb
#{
@
id
}
--args -p '
#{
path
}
' & echo $!"
projects
[
path
]
=
(
parseInt
pid
)
+
1
writeFile
@
tmp
,
JSON
.
stringify
projects
projects
=
@
execGitKrakenMulti
path
window
.
addEventListener
'beforeunload'
,
->
exec
"kill
#{
projects
[
path
]
}
"
...
...
@@ -76,3 +68,31 @@ module.exports =
@
subs
.
dispose
()
window
.
removeEventListener
'beforeunload'
unlink
@
tmp
#-------------------------------------------------------------------------------
execGitKrakenSingle
:
(
path
)
->
if
process
.
platform
==
'darwin'
exec
"pkill GitKraken; sleep .1 && open -Fb
#{
@
id
}
--args -p '
#{
path
}
'"
#, @timeout
else
if
process
.
platform
==
'linux'
exec
"killall gitkraken; sleep .1 && gitkraken --args -p '
#{
path
}
' &> /dev/null &"
#-------------------------------------------------------------------------------
execGitKrakenMulti
:
(
path
)
->
projects
=
{}
try
projects
=
require
@
tmp
if
process
.
platform
==
'darwin'
execSync
"ps
#{
projects
[
path
]
}
| grep -q GitKraken && open -b
#{
@
id
}
--args -p '
#{
path
}
'"
else
if
process
.
platform
==
'linux'
execSync
"ps
#{
projects
[
path
]
}
| grep -q gitkraken"
catch
if
process
.
platform
==
'darwin'
pid
=
execSync
"open -nb
#{
@
id
}
--args -p '
#{
path
}
' & echo $!"
else
if
process
.
platform
==
'linux'
proc
=
exec
"nohup gitkraken --args -p '
#{
path
}
' &>/dev/null &"
pid
=
proc
.
pid
projects
[
path
]
=
(
parseInt
pid
)
+
1
writeFile
@
tmp
,
JSON
.
stringify
projects
projects
This diff is collapsed.
Click to expand it.
package.json
+
2
−
1
View file @
9376c103
...
...
@@ -19,7 +19,8 @@
"private"
:
true
,
"license"
:
"
MIT
"
,
"os"
:
[
"darwin"
"darwin"
,
"linux"
],
"dependencies"
:
{
"
sub-atom
"
:
"
^1.1.0
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment