Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bbriatte committed Jan 15, 2019
2 parents 1ad3a96 + 4efc997 commit a981d5a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@

All notable changes to this project will be documented in this file.
`digipolitan-app-swift-template-cli` adheres to [Semantic Versioning](http://semver.org/).

---

## [0.2.0](https://github.com/Digipolitan/app-swift-template-cli/releases/tag/v0.2.0)

Add tvOS project repository
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
digipolitan-app-swift-template-cli (0.1.1)
digipolitan-app-swift-template-cli (0.2.0)
digipolitan-apps-tools (~> 0.2)
rubyzip (~> 1.2)

Expand All @@ -22,4 +22,4 @@ DEPENDENCIES
rubyzip

BUNDLED WITH
1.15.4
1.17.1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2017, Digipolitan
Copyright (c) 2019, Digipolitan
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions digipolitan-app-swift-template-cli.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'digipolitan-app-swift-template-cli'
s.version = '0.1.0'
s.date = '2017-10-02'
s.version = '0.2.0'
s.date = '2019-01-15'
s.summary = 'Digipolitan Ruby tools to use swift app template'
s.homepage = 'https://github.com/Digipolitan/app-swift-template-cli'
s.email = 'contact@digipolitan.com'
Expand Down
9 changes: 8 additions & 1 deletion lib/digipolitan-app-swift-template-cli/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ module Digipolitan

class AppSwiftTemplate

@@sources = {
"iOS" => "https://github.com/Digipolitan/app-swift-template/archive/master.zip",
"tvOS" => "https://github.com/Digipolitan/app-swift-template-tvos/archive/master.zip"
}

def self.init(target_path = nil)

zip_path = ".template.zip"
Expand All @@ -26,8 +31,10 @@ def self.init(target_path = nil)
Digipolitan::UI.crash "The target directory contains an xcodeproj, please select another one or clear the directory."
end

platform = Digipolitan::UI.select("Choose your platform", @@sources.keys)

Digipolitan::UI.message "Downloading Digipolitan app...";
buffer = open('https://github.com/Digipolitan/app-swift-template/archive/master.zip').read
buffer = open(@@sources[platform]).read
Digipolitan::FileUtils.write_to_file(zip_path, buffer)
Digipolitan::UI.message "Unziping Digipolitan app...";

Expand Down

0 comments on commit a981d5a

Please sign in to comment.