Skip to content

Commit

Permalink
Merge bc04ee8 into 13537e3
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Oct 2, 2018
2 parents 13537e3 + bc04ee8 commit 2a0d9a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
1.1b2 (unreleased)
------------------

- Nothing changed yet.
- Emit current package version in package.json configuration (closes `#40 <https://github.com/simplesconsultoria/sc.recipe.staticresources/issues/40>`_).
[rodfersou]


1.1b1 (2018-09-28)
Expand Down
3 changes: 3 additions & 0 deletions src/sc/recipe/staticresources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import json
import logging
import os
import pkg_resources
import subprocess


VERSION = pkg_resources.get_distribution('sc.recipe.staticresources').version
CURRENT_DIR = path.dirname(__file__)
SCRIPT_TEMPLATE = """#!/bin/sh
export PATH={bin_directory}:$PATH
Expand Down Expand Up @@ -45,6 +47,7 @@ def __init__(self, buildout, name, options):
self.options.setdefault('destination', 'dist')
self.options.setdefault('bobtemplate', path.join(CURRENT_DIR, 'bobtemplate'))
self.bobtemplate = options['bobtemplate']
self.options.setdefault('version', VERSION)

def _error(self, msg):
self.logger.error(msg)
Expand Down
2 changes: 1 addition & 1 deletion src/sc/recipe/staticresources/bobtemplate/package.json.bob
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"repository": {},
"license": "GPL-2.0",
"dependencies": {
"sc-recipe-staticresources": "simplesconsultoria/sc.recipe.staticresources#1.0b2"
"sc-recipe-staticresources": "simplesconsultoria/sc.recipe.staticresources#{{{version}}}"
}
}

0 comments on commit 2a0d9a7

Please sign in to comment.