samus 3.0.2 → 3.0.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/CHANGELOG.md +21 -0
- data/Dockerfile +3 -0
- data/Dockerfile.build +2 -0
- data/Dockerfile.samus +5 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +8 -11
- data/commands/build/archive-git-full.help.md +0 -0
- data/commands/build/archive-tgz.help.md +0 -0
- data/commands/build/archive-zip.help.md +0 -0
- data/commands/build/changelog-parse.help.md +0 -0
- data/commands/build/chmod-files.help.md +0 -0
- data/commands/build/fs-copy.help.md +0 -0
- data/commands/build/fs-mkdir.help.md +0 -0
- data/commands/build/fs-rmrf.help.md +0 -0
- data/commands/build/fs-sedfiles.help.md +0 -0
- data/commands/build/gem-build.help.md +0 -0
- data/commands/build/git-archive.help.md +0 -0
- data/commands/build/git-clone.help.md +0 -0
- data/commands/build/git-commit.help.md +0 -0
- data/commands/build/git-merge.help.md +0 -0
- data/commands/build/make-task.help.md +0 -0
- data/commands/build/npm-pack.help.md +0 -0
- data/commands/build/npm-task.help.md +0 -0
- data/commands/build/npm-test.help.md +0 -0
- data/commands/build/rake-task.help.md +0 -0
- data/commands/build/ruby-bundle.help.md +0 -0
- data/commands/build/samus-build.help.md +0 -0
- data/commands/publish/cf-invalidate.help.md +0 -0
- data/commands/publish/gem-push.help.md +0 -0
- data/commands/publish/git-push.help.md +0 -0
- data/commands/publish/github-release.help.md +0 -0
- data/commands/publish/npm-publish.help.md +0 -0
- data/commands/publish/s3-put.help.md +0 -0
- data/commands/publish/samus-publish.help.md +0 -0
- data/entrypoint.sh +0 -0
- data/lib/samus.rb +6 -0
- data/lib/samus/action.rb +0 -0
- data/lib/samus/build_action.rb +0 -0
- data/lib/samus/builder.rb +0 -0
- data/lib/samus/command.rb +0 -0
- data/lib/samus/credentials.rb +0 -0
- data/lib/samus/publish_action.rb +0 -0
- data/lib/samus/publisher.rb +0 -0
- data/lib/samus/rake/samus_task.rb +111 -0
- data/lib/samus/version.rb +1 -1
- data/samus.gemspec +0 -0
- data/samus.json +0 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4ae50bb62ac1a723440bdeb5b2481190be1c4c937decebdd7bf6d372c3b5373
|
4
|
+
data.tar.gz: 3c1995481a759d75315aff3498cf92ef2d26e600e0addc833e6ce4b2ee4c1db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c33f66b251e307696f80b26fba7a4decc6c9a9a96c9927dbe7cb51a0e341527f78991d8a8b8bddc0a8716e5095246526366a87ab3cee2cd3084e8d98efb9165c
|
7
|
+
data.tar.gz: 05b0bd0f94ebb9809521b4eeaac23b7d9d7890667373cabbae7e5779949c8a5c806f103577e2855a4e8976cb0a49bb9d3c433861ca447af72a7013127714dfdb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# 3.0.3 - April 1st, 2019
|
2
|
+
|
3
|
+
- Add `Samus::Rake::ReleaseTask` and `Samus::Rake::DockerReleaseTask` to
|
4
|
+
generate helpful Rake tasks to generate releases. Example:
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
require 'samus'
|
8
|
+
|
9
|
+
Samus::Rake::ReleaseTask.new do |t|
|
10
|
+
t.git_pull_after_release = true # default is true
|
11
|
+
t.zipfile = "customzip.tar.gz" # default release-vX.Y.Z.tar.gz
|
12
|
+
t.buildfile = "samus.json" # default is samus.json
|
13
|
+
end
|
14
|
+
```
|
15
|
+
|
16
|
+
- Add `lsegal/samus:build` Dockerfile to simplify creation of build docker images.
|
17
|
+
|
1
18
|
# 3.0.2 - April 1st, 2019
|
2
19
|
|
3
20
|
- Add `chmod-files` command to fix file permissions on globs.
|
@@ -62,3 +79,7 @@
|
|
62
79
|
# 1.3.0 - July 23, 2014
|
63
80
|
|
64
81
|
- Fix issue where repository would not reset when using `samus-build` command.
|
82
|
+
|
83
|
+
```
|
84
|
+
|
85
|
+
```
|
data/Dockerfile
CHANGED
@@ -9,6 +9,9 @@ RUN echo "Host *" > ~/.ssh/config
|
|
9
9
|
RUN echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
10
10
|
RUN chmod 400 ~/.ssh/config
|
11
11
|
|
12
|
+
RUN git config --global user.email "bot@not.human"
|
13
|
+
RUN git config --global user.name "Samus Release Bot"
|
14
|
+
|
12
15
|
COPY . /samus
|
13
16
|
ENV PATH=$PATH:/samus/bin
|
14
17
|
|
data/Dockerfile.build
ADDED
data/Dockerfile.samus
ADDED
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
|
1
|
+
require_relative './lib/samus'
|
2
2
|
|
3
|
-
|
4
|
-
"docker run --rm -v #{Dir.home}:/root:ro -v #{Dir.pwd}:/build lsegal/samus"
|
5
|
-
end
|
3
|
+
task default: 'samus:build'
|
6
4
|
|
7
|
-
|
8
|
-
sh "docker build -t lsegal/samus ."
|
9
|
-
end
|
5
|
+
Samus::Rake::DockerReleaseTask.new
|
10
6
|
|
11
|
-
task
|
12
|
-
sh "
|
7
|
+
task :images do
|
8
|
+
sh "docker build -t lsegal/samus:latest -f Dockerfile ."
|
9
|
+
sh "docker build -t lsegal/samus:build -f Dockerfile.build ."
|
13
10
|
end
|
14
11
|
|
15
|
-
|
16
|
-
|
12
|
+
namespace :samus do
|
13
|
+
task build: :images
|
17
14
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/entrypoint.sh
CHANGED
File without changes
|
data/lib/samus.rb
CHANGED
@@ -4,6 +4,12 @@ require_relative './samus/builder'
|
|
4
4
|
module Samus
|
5
5
|
CONFIG_PATH = File.expand_path(ENV['SAMUS_CONFIG_PATH'] || '~/.samus')
|
6
6
|
|
7
|
+
module Rake
|
8
|
+
# Autoloads
|
9
|
+
autoload :ReleaseTask, File.expand_path('samus/rake/samus_task', __dir__)
|
10
|
+
autoload :DockerReleaseTask, File.expand_path('samus/rake/samus_task', __dir__)
|
11
|
+
end
|
12
|
+
|
7
13
|
module_function
|
8
14
|
|
9
15
|
def config_paths; @@config_paths end
|
data/lib/samus/action.rb
CHANGED
File without changes
|
data/lib/samus/build_action.rb
CHANGED
File without changes
|
data/lib/samus/builder.rb
CHANGED
File without changes
|
data/lib/samus/command.rb
CHANGED
File without changes
|
data/lib/samus/credentials.rb
CHANGED
File without changes
|
data/lib/samus/publish_action.rb
CHANGED
File without changes
|
data/lib/samus/publisher.rb
CHANGED
File without changes
|
@@ -0,0 +1,111 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/tasklib'
|
3
|
+
|
4
|
+
require_relative '../../samus'
|
5
|
+
|
6
|
+
module Samus
|
7
|
+
module Rake
|
8
|
+
module Helpers
|
9
|
+
private
|
10
|
+
|
11
|
+
def release_version
|
12
|
+
return @version if defined?(@version)
|
13
|
+
raise "Missing VERSION=X.Y.Z" unless ENV['VERSION']
|
14
|
+
@version = ENV['VERSION'].sub(/^v/, '')
|
15
|
+
end
|
16
|
+
|
17
|
+
def release_image
|
18
|
+
return @image if defined?(@image)
|
19
|
+
@image = "samus/release/#{File.basename(Dir.pwd)}:v#{release_version}"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class DockerReleaseTask < ::Rake::TaskLib
|
24
|
+
include Helpers
|
25
|
+
|
26
|
+
DEFAULT_DOCKERFILE = "Dockerfile.samus"
|
27
|
+
|
28
|
+
attr_accessor :dockerfile
|
29
|
+
|
30
|
+
attr_accessor :delete_image_after_publish
|
31
|
+
|
32
|
+
attr_accessor :git_pull_before_build
|
33
|
+
|
34
|
+
attr_accessor :git_pull_after_publish
|
35
|
+
|
36
|
+
def initialize(namespace = :samus)
|
37
|
+
@namespace = namespace
|
38
|
+
@dockerfile = DEFAULT_DOCKERFILE
|
39
|
+
@delete_image_after_publish = true
|
40
|
+
@git_pull_before_build = true
|
41
|
+
@git_pull_after_publish = true
|
42
|
+
yield self if block_given?
|
43
|
+
define
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def define
|
49
|
+
namespace(@namespace) do
|
50
|
+
desc '[VERSION=X.Y.Z] Builds a Samus release using Docker'
|
51
|
+
task :build do
|
52
|
+
img = release_image
|
53
|
+
ver = release_version
|
54
|
+
sh "git pull" if git_pull_before_build
|
55
|
+
sh "docker build . -t #{img} -f #{dockerfile} --build-arg VERSION=#{ver}"
|
56
|
+
end
|
57
|
+
|
58
|
+
desc '[VERSION=X.Y.Z] Publishes a built release using Docker'
|
59
|
+
task :publish do
|
60
|
+
img = release_image
|
61
|
+
mount = "#{Samus::CONFIG_PATH}:/root/.samus:ro"
|
62
|
+
sh "docker run -v #{mount} --rm #{img}"
|
63
|
+
sh "docker rmi -f #{img}" if delete_image_after_publish
|
64
|
+
sh "git pull" if git_pull_after_publish
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class ReleaseTask < ::Rake::TaskLib
|
71
|
+
include Helpers
|
72
|
+
|
73
|
+
attr_accessor :git_pull_before_build
|
74
|
+
attr_accessor :git_pull_after_publish
|
75
|
+
attr_accessor :buildfile
|
76
|
+
attr_writer :zipfile
|
77
|
+
|
78
|
+
def initialize(namespace = :samus)
|
79
|
+
@namespace = namespace
|
80
|
+
@buildfile = ""
|
81
|
+
@zipfile = nil
|
82
|
+
@git_pull_before_build = true
|
83
|
+
@git_pull_after_publish = true
|
84
|
+
yield self if block_given?
|
85
|
+
define
|
86
|
+
end
|
87
|
+
|
88
|
+
private
|
89
|
+
|
90
|
+
def zipfile
|
91
|
+
@zipfile || "release-v#{release_version}.tar.gz"
|
92
|
+
end
|
93
|
+
|
94
|
+
def define
|
95
|
+
namespace(@namespace) do
|
96
|
+
desc '[VERSION=X.Y.Z] Builds a Samus release'
|
97
|
+
task :build do
|
98
|
+
sh "git pull" if git_pull_before_build
|
99
|
+
sh "samus build -o #{zipfile} #{release_version} #{buildfile}"
|
100
|
+
end
|
101
|
+
|
102
|
+
desc '[VERSION=X.Y.Z] Publishes a built release'
|
103
|
+
task :publish do
|
104
|
+
sh "samus publish #{zipfile}"
|
105
|
+
sh "git pull" if git_pull_after_publish
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
data/lib/samus/version.rb
CHANGED
data/samus.gemspec
CHANGED
File without changes
|
data/samus.json
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loren Segal
|
@@ -19,6 +19,8 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- CHANGELOG.md
|
21
21
|
- Dockerfile
|
22
|
+
- Dockerfile.build
|
23
|
+
- Dockerfile.samus
|
22
24
|
- LICENSE
|
23
25
|
- README.md
|
24
26
|
- Rakefile
|
@@ -89,6 +91,7 @@ files:
|
|
89
91
|
- lib/samus/credentials.rb
|
90
92
|
- lib/samus/publish_action.rb
|
91
93
|
- lib/samus/publisher.rb
|
94
|
+
- lib/samus/rake/samus_task.rb
|
92
95
|
- lib/samus/version.rb
|
93
96
|
- samus.gemspec
|
94
97
|
- samus.json
|