Skip to content

Commit

Permalink
fixed code to work when called from other directories and even from a…
Browse files Browse the repository at this point in the history
… symlink
  • Loading branch information
Emily-Steel committed Oct 27, 2015
1 parent d63d9a8 commit c735d78
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion file_json_provider.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "json"
require "./issue_provider"
require_relative "./issue_provider"

class FileJSONProvider < IssueProvider
VERSION_PATH = "./version.json"
Expand Down
3 changes: 2 additions & 1 deletion generate_release_notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
exit -1
end

project_root = File.dirname(File.absolute_path(__FILE__))
path = File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__
project_root = File.dirname(File.absolute_path(path))
Jira::Utils::load_config("#{project_root}/jira/config.yaml")

version = Jira::Version::by_name(ARGV[0])
Expand Down
2 changes: 1 addition & 1 deletion release.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "./json_issue"
require_relative "./json_issue"

class Release
STORIES_LABEL="Changes"
Expand Down
4 changes: 2 additions & 2 deletions stdout_confluence_reporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "./release_reporter"
require "./json_issue"
require_relative "./release_reporter"
require_relative "./json_issue"

class StdOutConfluenceReporter < ReleaseReporter
def open_section(name)
Expand Down
4 changes: 2 additions & 2 deletions stdout_reporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "./release_reporter"
require "./json_issue"
require_relative "./release_reporter"
require_relative "./json_issue"

class StdOutReporter < ReleaseReporter
def open_section(name)
Expand Down

0 comments on commit c735d78

Please sign in to comment.