pkgforge 0.12.1 → 0.12.3
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 +4 -4
- data/lib/pkgforge/components/package.rb +11 -12
- data/lib/pkgforge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f40db06d4d05929bc5fa525b72b81c5ad582569e
|
4
|
+
data.tar.gz: 38fadcfe258962b73be99158ef5e7c89abe4998e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15fa4ea795861b42c5b7cfe66a549015e560c1e9a6438f4fa24515fa04c80dc7aaf4bc09db16dd75cd4269745d91179e1940445d2d159118ee3c655b466d2222
|
7
|
+
data.tar.gz: b21def107cb435e2e41ebc6522d8011fd255bf187be4faf62894fff728fd284f0693a77d98b5631b2bd96f6cfece52ea2b32cf2e7d5acf5aa9c04dfe54ad8dc6
|
@@ -21,13 +21,21 @@ module PkgForge
|
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
+
Contract String, String => nil
|
25
|
+
def expose_artifact(artifact_name, artifact_source)
|
26
|
+
FileUtils.mkdir_p 'pkg'
|
27
|
+
dest = File.join('pkg', artifact_name)
|
28
|
+
FileUtils.cp artifact_source, dest
|
29
|
+
FileUtils.chmod 0o0644, dest
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
24
33
|
Contract None => nil
|
25
34
|
def file_prepare_package
|
26
35
|
raise('File package type requires "path" setting') unless package[:path]
|
27
36
|
@upload_path = File.join(tmpdir(:release), package[:path])
|
28
37
|
@upload_name = package[:name] || name
|
29
|
-
|
30
|
-
nil
|
38
|
+
expose_artifact @upload_name, @upload_path
|
31
39
|
end
|
32
40
|
|
33
41
|
Contract None => nil
|
@@ -35,7 +43,7 @@ module PkgForge
|
|
35
43
|
@upload_path = tmpfile(:tarball)
|
36
44
|
@upload_name = "#{name}.tar.gz"
|
37
45
|
make_tarball!
|
38
|
-
|
46
|
+
expose_artifact "#{name}-#{git_hash}.tar.gz", tmpfile(:tarball)
|
39
47
|
end
|
40
48
|
|
41
49
|
Contract None => nil
|
@@ -50,15 +58,6 @@ module PkgForge
|
|
50
58
|
def git_hash
|
51
59
|
`git rev-parse --short HEAD`.rstrip
|
52
60
|
end
|
53
|
-
|
54
|
-
Contract None => nil
|
55
|
-
def copy_tarball!
|
56
|
-
FileUtils.mkdir_p 'pkg'
|
57
|
-
pkg_file = "pkg/#{name}-#{git_hash}.tar.gz"
|
58
|
-
FileUtils.cp tmpfile(:tarball), pkg_file
|
59
|
-
FileUtils.chmod 0o0644, pkg_file
|
60
|
-
nil
|
61
|
-
end
|
62
61
|
end
|
63
62
|
|
64
63
|
module DSL
|
data/lib/pkgforge/version.rb
CHANGED