samus 2.0.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Dockerfile +3 -1
  4. data/LICENSE +0 -0
  5. data/README.md +0 -0
  6. data/Rakefile +8 -34
  7. data/bin/samus +0 -0
  8. data/commands/build/archive-git-full +0 -0
  9. data/commands/build/archive-git-full.help.md +0 -0
  10. data/commands/build/archive-tgz +0 -0
  11. data/commands/build/archive-tgz.help.md +0 -0
  12. data/commands/build/archive-zip +0 -0
  13. data/commands/build/archive-zip.help.md +0 -0
  14. data/commands/build/changelog-parse +12 -13
  15. data/commands/build/changelog-parse.help.md +0 -0
  16. data/commands/build/fs-copy +0 -0
  17. data/commands/build/fs-copy.help.md +0 -0
  18. data/commands/build/fs-mkdir +0 -0
  19. data/commands/build/fs-mkdir.help.md +0 -0
  20. data/commands/build/fs-rmrf +0 -0
  21. data/commands/build/fs-rmrf.help.md +0 -0
  22. data/commands/build/fs-sedfiles +0 -0
  23. data/commands/build/fs-sedfiles.help.md +0 -0
  24. data/commands/build/gem-build +0 -0
  25. data/commands/build/gem-build.help.md +0 -0
  26. data/commands/build/git-archive +0 -0
  27. data/commands/build/git-archive.help.md +0 -0
  28. data/commands/build/git-clone +0 -0
  29. data/commands/build/git-clone.help.md +0 -0
  30. data/commands/build/git-commit +0 -0
  31. data/commands/build/git-commit.help.md +0 -0
  32. data/commands/build/git-merge +0 -1
  33. data/commands/build/git-merge.help.md +0 -0
  34. data/commands/build/make-task +0 -0
  35. data/commands/build/make-task.help.md +0 -0
  36. data/commands/build/npm-pack +0 -0
  37. data/commands/build/npm-pack.help.md +0 -0
  38. data/commands/build/npm-task +0 -0
  39. data/commands/build/npm-task.help.md +0 -0
  40. data/commands/build/npm-test +0 -0
  41. data/commands/build/npm-test.help.md +0 -0
  42. data/commands/build/rake-task +5 -1
  43. data/commands/build/rake-task.help.md +0 -0
  44. data/commands/build/ruby-bundle +3 -0
  45. data/commands/build/ruby-bundle.help.md +4 -0
  46. data/commands/build/samus-build +0 -0
  47. data/commands/build/samus-build.help.md +0 -0
  48. data/commands/build/support/generate-commit-message.rb +0 -0
  49. data/commands/publish/cf-invalidate +0 -0
  50. data/commands/publish/cf-invalidate.help.md +0 -0
  51. data/commands/publish/gem-push +0 -0
  52. data/commands/publish/gem-push.help.md +0 -0
  53. data/commands/publish/git-push +0 -0
  54. data/commands/publish/git-push.help.md +0 -0
  55. data/commands/publish/github-release +0 -0
  56. data/commands/publish/github-release.help.md +0 -0
  57. data/commands/publish/npm-publish +0 -0
  58. data/commands/publish/npm-publish.help.md +0 -0
  59. data/commands/publish/s3-put +0 -0
  60. data/commands/publish/s3-put.help.md +0 -0
  61. data/commands/publish/samus-publish +0 -0
  62. data/commands/publish/samus-publish.help.md +0 -0
  63. data/entrypoint.sh +3 -0
  64. data/lib/samus.rb +0 -0
  65. data/lib/samus/action.rb +0 -0
  66. data/lib/samus/build_action.rb +0 -0
  67. data/lib/samus/builder.rb +0 -0
  68. data/lib/samus/command.rb +0 -0
  69. data/lib/samus/credentials.rb +0 -0
  70. data/lib/samus/publish_action.rb +0 -0
  71. data/lib/samus/publisher.rb +0 -0
  72. data/lib/samus/version.rb +1 -1
  73. data/samus.gemspec +0 -0
  74. data/samus.json +0 -0
  75. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 654c4b19f600440932a23fd88828da9aa160ef507bb583b2cbc16c6e327aad0b
4
- data.tar.gz: a4330ebd58c0c3ef5a19776a7ea4eba296278e95ed0a74342024ed0ac9f7737a
3
+ metadata.gz: 70687c9193d62210ab399d31952371626c11bc8a4bb0eb166e162dcf6a99e449
4
+ data.tar.gz: 1db09436786cafd10d6d952078a0221d8ea19263f559add896dc0345a8b8767f
5
5
  SHA512:
6
- metadata.gz: e931ee16f9ee22f06ec16f2b5971dd2c7fa9ab77a37d93595a8de916048cea6a6f3619798bfcb0f918fd0033324c66c75a4eab9e8a195059380388cd0df89bec
7
- data.tar.gz: 69f7493bb66ac0f3c51b5009e793075dd7f37c1a8f20fa0d1e4f02969cb23fa04db8bf8caec4e3cf519903e5454fb935bc14a6c8cbbd7e016d71f8fd882a668a
6
+ metadata.gz: 87d0a7f05c3e6b3e4a59d1c4495063a2e57dcb38c12300b47d5e529b4252f985f778117441aeadb950e0af0d1470c2a8ee8217104f7b17fd36b17dd9e45293aa
7
+ data.tar.gz: 3d827b13ed2fca31fe39e8972d10a3764dc6a6724ab64d177ac421d697c3d0fab2f15ec889f3e7af50c17b216cd55ec56b3cebd7e29a70643b813e21e7d441df
@@ -1,3 +1,12 @@
1
+ # 3.0.0 - March 30th, 2019
2
+
3
+ - Add `build/ruby-bundle` command to run Bundler commands like install.
4
+ - Update `build/rake-task` to `bundle exec` when a Gemfile is present.
5
+ - Update `lsegal/samus` Docker image to contain Bundler 1.17.2.
6
+ - Update `build/changelog-parse` to support different formatting.
7
+ - Update `build/git-merge` to no longer pull from remote since credentials
8
+ are not supported at build time.
9
+
1
10
  # 2.0.3 - August 12th, 2018
2
11
 
3
12
  - Add `--docker` support to build and publish which runs Samus inside a pre-built
data/Dockerfile CHANGED
@@ -1,7 +1,8 @@
1
1
  FROM python:3.7-alpine
2
2
 
3
- RUN apk add openssh ruby ruby-json nodejs git curl
3
+ RUN apk add -U --no-cache openssh ruby ruby-json nodejs git curl
4
4
  RUN pip install awscli
5
+ RUN gem install bundler -v '1.17.3' --no-rdoc --no-ri
5
6
  RUN gem install rake --no-rdoc --no-ri
6
7
  RUN mkdir -p ~/.ssh
7
8
  RUN echo "Host *" > ~/.ssh/config
@@ -12,3 +13,4 @@ COPY . /samus
12
13
  ENV PATH=$PATH:/samus/bin
13
14
 
14
15
  WORKDIR /build
16
+ ENTRYPOINT [ "/samus/entrypoint.sh" ]
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
@@ -1,43 +1,17 @@
1
1
  task default: :build
2
2
 
3
- task :build do
4
- home = Dir.home
5
- id = `docker build -q .`.chomp
6
- dirs = [
7
- "#{home}/.ssh:/root/.sshkeys",
8
- "#{home}/.samus:/root/.samus",
9
- "#{home}/.gitconfig:/root/.gitconfig",
10
- "#{Dir.pwd}:/app"
11
- ]
12
- cmd = "rake build_from_docker VERSION=#{ENV['VERSION']}"
13
- alldirs = dirs.map { |d| "-v \"#{d}\"" }.join(' ')
14
- sh "docker run --rm #{alldirs} -w /app -t #{id} #{cmd}"
3
+ def docker_cmd
4
+ "docker run --rm -v #{Dir.home}:/root:ro -v #{Dir.pwd}:/build lsegal/samus"
15
5
  end
16
6
 
17
- task :build_from_docker do
18
- version = ENV['VERSION']
19
- sh 'mkdir -p ~/.ssh && cp -R ~/.sshkeys/* ~/.ssh'
20
- sh 'chmod 700 ~/.ssh && chmod 400 ~/.ssh/*'
21
- sh "samus build #{version}"
7
+ task :image do
8
+ sh "docker build -t lsegal/samus ."
22
9
  end
23
10
 
24
- task :publish do
25
- home = Dir.home
26
- id = `docker build -q .`.chomp
27
- dirs = [
28
- "#{home}/.ssh:/root/.sshkeys",
29
- "#{home}/.samus:/root/.samus",
30
- "#{home}/.gitconfig:/root/.gitconfig",
31
- "#{Dir.pwd}:/app"
32
- ]
33
- cmd = "rake publish_from_docker FILE=#{ENV['FILE']}"
34
- alldirs = dirs.map { |d| "-v \"#{d}\"" }.join(' ')
35
- sh "docker run --rm #{alldirs} -w /app -t #{id} #{cmd}"
11
+ task build: :image do
12
+ sh "#{docker_cmd} build #{ENV['VERSION']}"
36
13
  end
37
14
 
38
- task :publish_from_docker do
39
- file = ENV['FILE']
40
- sh 'mkdir -p ~/.ssh && cp -R ~/.sshkeys/* ~/.ssh'
41
- sh 'chmod 700 ~/.ssh && chmod 400 ~/.ssh/*'
42
- sh "samus publish #{file}"
15
+ task :publish do
16
+ sh "#{docker_cmd} publish release-v#{ENV['VERSION']}.tar.gz"
43
17
  end
data/bin/samus CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,20 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  def parse_changelog(changelog)
4
- out, collect_started = [], false
5
- File.read(changelog).split(/\r?\n/).each do |line|
6
- if line =~ /^(#+\s+)\S/
7
- break if collect_started
8
- collect_started = true
9
- next
10
- end
11
-
12
- next if line =~ /^(\S)\1*$/
13
- out << line if collect_started
14
- end
15
- out.join("\n").strip
4
+ log = File.read(changelog)
5
+ match = /^#\s*\[?#{ENV["_VERSION"]}\]?\s+-\s+(?<title>.+?)\r?\n(?<body>.*?)\r?\n#/ms.match(log)
6
+ match ? match["body"] : nil
16
7
  end
17
8
 
18
9
  file = ARGV[0]
19
10
  dest = File.join(ENV["__BUILD_DIR"], ENV["_DESTINATION"] || file)
20
- File.open(dest, "w") {|f| f.puts(parse_changelog(file)) }
11
+ out = parse_changelog(file)
12
+ if out
13
+ puts "Changelog:"
14
+ puts out
15
+ File.open(dest, "w") {|f| f.puts(out) }
16
+ else
17
+ puts "Failed to find changelog data"
18
+ exit 1
19
+ 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
@@ -1,7 +1,6 @@
1
1
  #!/bin/sh
2
2
 
3
3
  set -e
4
- git fetch ${_REMOTE-origin}
5
4
  git checkout -q $_BRANCH
6
5
  echo branch $_BRANCH $(git rev-parse HEAD) >> $__RESTORE_FILE
7
6
  git rebase ${_REMOTE-origin}/$_BRANCH
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
@@ -1,3 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
- ruby -S rake $_TASK
3
+ if [ -f Gemfile ]; then
4
+ ruby -S bundle exec rake $_TASK
5
+ else
6
+ ruby -S rake $_TASK
7
+ fi
File without changes
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ ruby -S bundle ${_COMMAND:-install}
@@ -0,0 +1,4 @@
1
+ Runs `bundler` on a given directory
2
+
3
+ Arguments:
4
+ * command: the Bundler command to run
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
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ sh -c "/samus/bin/samus $*"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module Samus
2
- VERSION = '2.0.3'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
File without changes
data/samus.json CHANGED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Segal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-13 00:00:00.000000000 Z
11
+ date: 2019-03-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: lsegal@soen.ca
@@ -59,6 +59,8 @@ files:
59
59
  - commands/build/npm-test.help.md
60
60
  - commands/build/rake-task
61
61
  - commands/build/rake-task.help.md
62
+ - commands/build/ruby-bundle
63
+ - commands/build/ruby-bundle.help.md
62
64
  - commands/build/samus-build
63
65
  - commands/build/samus-build.help.md
64
66
  - commands/build/support/generate-commit-message.rb
@@ -76,6 +78,7 @@ files:
76
78
  - commands/publish/s3-put.help.md
77
79
  - commands/publish/samus-publish
78
80
  - commands/publish/samus-publish.help.md
81
+ - entrypoint.sh
79
82
  - lib/samus.rb
80
83
  - lib/samus/action.rb
81
84
  - lib/samus/build_action.rb