lib/gjp/project.rb in gjp-0.13.1 vs lib/gjp/project.rb in gjp-0.14.1
- old
+ new
@@ -40,22 +40,22 @@
Dir.chdir(dir) do
if Dir.exists?(".git") == false
`git init`
end
+ Dir.mkdir "src"
+ Dir.mkdir "kit"
+
+ # automatically begin a gathering phase
+ Project.new(".").gather
+
template_manager = Gjp::TemplateManager.new
template_manager.copy "archives", "."
template_manager.copy "file_lists", "."
template_manager.copy "kit", "."
template_manager.copy "specs", "."
template_manager.copy "src", "."
-
- `git add .`
- `git commit -m "Project initialized"`
-
- # automatically begin a gathering phase
- Project.new(".").gather
end
end
# starts a gathering phase, all files added to the project
# will be added to packages (including kit)
@@ -185,10 +185,10 @@
end
end
# returns the last tag given in a gjp snapshot
def latest_tag(tag)
- `git describe --abbrev=0 --tags --match=gjp_#{tag}_*`.strip
+ `git describe --abbrev=0 --tags --match=gjp_#{tag}_* --always`.strip
end
# reverts path contents as per latest tag
def revert(path, tag)
`git rm -rf --ignore-unmatch #{path}`