Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
make sure to change destinatione elm-package, not local
Browse files Browse the repository at this point in the history
  • Loading branch information
eeue56 committed Mar 18, 2016
1 parent b4dce64 commit d6c9651
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions elm_self_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def self_publish(package_location, destination=".", quiet=False):
"""

elm_package_file = "{location}/elm-package.json".format(location=package_location)
destination_elm_package_file = "{destination}/elm-package.json".format(destination=destination)

exact_deps_file = "{destination}/elm-stuff/exact-dependencies.json".format(
destination=destination,
location=package_location
Expand Down Expand Up @@ -59,9 +61,12 @@ def self_publish(package_location, destination=".", quiet=False):
package_info[place] = version
json.dump(package_info, f, sort_keys=False, indent=4)

with open(elm_package_file, 'w') as f:
elm_package['dependencies'][place] = version
json.dump(elm_package, f, sort_keys=False, indent=4)
with open(destination_elm_package_file) as f:
destination_elm_package = json.load(f)

with open(destination_elm_package_file, 'w') as f:
destination_elm_package['dependencies'][place] = "{version} <= v <= {version}".format(version=version)
json.dump(destination_elm_package, f, sort_keys=False, indent=4)


def main():
Expand Down

0 comments on commit d6c9651

Please sign in to comment.