Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding version to config file name closes #2731 #2734

Merged
merged 3 commits into from
Jul 15, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
reverting to use package version
  • Loading branch information
myleshorton committed Jul 15, 2015
commit 0d2928f4033856e8fbed81a31cc6aaa7ade7957c
2 changes: 1 addition & 1 deletion src/github.com/getlantern/flashlight/flashlight.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func doMain() error {

parseFlags()

cfg, err := config.Init(version)
cfg, err := config.Init(packageVersion)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use version here instead of packageVersion -- packageVersion looks like it defaults to 9999.99.99, and that's to avoid auto-updating in development mode. version contains the current git revision so we'd get lantern-bae7606.yaml instead of lantern-9999.99.99.yaml which I think is more informative.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I initially just made the change but then reverted it. In production they'll be the same values, but I think in development the tricky thing is that the commit will continually change, so if you're actually testing using that yaml file like we are for #2608 you might get screwed up if you're development pattern involves committing locally a lot, for example.

Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @atavism!

packageVersion was initially intended for autoupdates only. If no VERSION is passed to the Makefile it will use the git revision and when compiled in development mode it will use 9999.99.99. I think the git revision would be more informative but I also think it would be harder to associate it with an actual release, as we'll always have to lookup the git revision.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I agree @xiam. Also in production they're always the same regardless.

if err != nil {
return fmt.Errorf("Unable to initialize configuration: %v", err)
}
Expand Down