dnnbundler 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ca56a3f1880eddf8ae88de939be914073adcaec
|
|
4
|
+
data.tar.gz: 781a3d692a996658ceaf8e0fd13aecfe4c36a3d8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72a173d766a4d92933902663f2dd730c5a4278927dc6438f5b0f31167811f66829d8ab5876cef3e60c5c4a61858be467e4ac27cba4ae863b49c78438148ad89d
|
|
7
|
+
data.tar.gz: 55d925638392936f619cfac4424cf46d84ec7c4d7ea3f1586e2dbd1e2f77381c0a57ee4c6762e7154a6071b24ca1d0a9b8dbcc6079ca6decb848b5cc5faa37f7
|
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Dnnbundler
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
DNNBundler is intended to automate creation of zip packages for DotNetNuke.
|
|
4
|
+
Put your Ruby code in the file `lib/dnnbundler`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
5
|
|
|
5
6
|
TODO: Delete this and the text above, and describe your gem
|
|
6
7
|
|
data/lib/dnnbundler/cli.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require "dnnbundler/zipFileGenerator"
|
|
2
|
-
require "dnnbundler/
|
|
2
|
+
require "dnnbundler/packageVersionReplacer"
|
|
3
|
+
require "dnnbundler/jsonConfig"
|
|
3
4
|
require "thor"
|
|
4
5
|
require "json"
|
|
5
6
|
|
|
@@ -14,21 +15,21 @@ module Dnnbundler
|
|
|
14
15
|
file = File.read(config)
|
|
15
16
|
data_hash = JSON.parse(file)
|
|
16
17
|
|
|
17
|
-
manifest_files = data_hash[
|
|
18
|
+
manifest_files = data_hash[JsonConfig::Manifests]
|
|
18
19
|
current_version = Dnnbundler::getVersionFromManifest manifest_files[0]
|
|
19
|
-
version_numbers = current_version
|
|
20
|
+
version_numbers = Dnnbundler::splitVersionNumbers current_version
|
|
20
21
|
|
|
21
22
|
version_numbers[1] = version_numbers[1] + 1 if options[:bumpSprint]
|
|
22
23
|
version_numbers[2] = 1 if options[:bumpSprint]
|
|
23
24
|
version_numbers[2] = version_numbers[2] + 1 if options[:bumpBuild]
|
|
24
|
-
version_numbers = options[:targetVersion]
|
|
25
|
+
version_numbers = Dnnbundler::splitVersionNumbers(options[:targetVersion]) if options[:targetVersion]
|
|
25
26
|
|
|
26
27
|
new_version = Dnnbundler::formatVersion(version_numbers)
|
|
27
28
|
puts "current version is #{current_version}"
|
|
28
29
|
puts "new version is #{new_version}"
|
|
29
30
|
|
|
30
|
-
data_hash[
|
|
31
|
-
package[
|
|
31
|
+
data_hash[JsonConfig::Packages].each do |package|
|
|
32
|
+
package[JsonConfig::Name].sub! JsonConfig::PackageVersionPlaceholder, new_version
|
|
32
33
|
Dnnbundler::replaceVersionInManifestFiles manifest_files, new_version
|
|
33
34
|
|
|
34
35
|
generator = ZipFileGenerator.new(package)
|
|
@@ -40,4 +41,8 @@ module Dnnbundler
|
|
|
40
41
|
def self.formatVersion(version)
|
|
41
42
|
"#{version[0].to_s.rjust(4, "0")}.#{version[1].to_s.rjust(2, "0")}.#{version[2].to_s.rjust(4, "0")}"
|
|
42
43
|
end
|
|
44
|
+
|
|
45
|
+
def self.splitVersionNumbers(version_string)
|
|
46
|
+
version_string.split(".").map { |x| x.to_i }
|
|
47
|
+
end
|
|
43
48
|
end
|
data/lib/dnnbundler/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dnnbundler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Le0Michine
|
|
@@ -102,8 +102,8 @@ files:
|
|
|
102
102
|
- lib/dnnbundler/cli.rb
|
|
103
103
|
- lib/dnnbundler/fileEntry.rb
|
|
104
104
|
- lib/dnnbundler/fileEntryType.rb
|
|
105
|
-
- lib/dnnbundler/fileStringReplacer/fileStringReplacer.rb
|
|
106
105
|
- lib/dnnbundler/jsonConfig.rb
|
|
106
|
+
- lib/dnnbundler/packageVersionReplacer.rb
|
|
107
107
|
- lib/dnnbundler/version.rb
|
|
108
108
|
- lib/dnnbundler/zipFileGenerator.rb
|
|
109
109
|
homepage: https://github.com/Le0Michine/dnnbundler
|