intello-shipit-cli 1.2.0 → 1.3.0

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
  SHA256:
3
- metadata.gz: 61575736646b080306c67d9a543a9603c748faec5c7b5f7c6b5a2dc0154e099e
4
- data.tar.gz: 45a103fd0a48d629a67abfac6a6a4b786f9bf8c9d3221e6eb7a6f1f5c6da4dd7
3
+ metadata.gz: 0c4795dc17a4c6b03dc3446b9f365f5be72f33ca155f54bb621aac3fbc631e7a
4
+ data.tar.gz: 106c04cf366e83b3b3616e192c866936929bd99d623e75853c91562376d3bd45
5
5
  SHA512:
6
- metadata.gz: cb8f3664cbe9f66a9559f8822e19aeb0bb7b9468a54df76258ac3f26908c7d42ded6463e50797e4c794eaf651683e362dc3dd65df05e32f8bac0e45e7b068a14
7
- data.tar.gz: b370aa66d1908b69e7cf37ff6b220668ef55f91bc48290e9147787500d87cf41a22b70d6791175701ac77f5a2f8b8bbcc2eb0a295049da6b3b8302405708f91e
6
+ metadata.gz: f04183c2c88b07988dd50b82ba70e3db98ed9b1afb02b684617d7b9e5ae2c4bcaa6f2de04c8d07923e73b6f87e2ccc811a06d4fede245cca0e9ff17daa30f12a
7
+ data.tar.gz: f2b9437e9d64b0a78bc6afe4c4d885f979630897fc8713d97bcec0cd99b05bc8d0bf186d320d5ba332e3ee1d4203179d662590937a97611a0bd7c57bdc1de3cd
data/Changelog.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  NOTE: the project follows [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## v1.3.0 - October 12th, 2022
8
+
9
+ - [enhancement] #8 - Add option to skip CICD when shipping
10
+
7
11
  ## v1.2.0 - March 9th, 2022
8
12
 
9
13
  - [bug] #3 - Support when project is located in sub folder
data/exe/shipit CHANGED
@@ -24,6 +24,7 @@ sort_help :manually
24
24
  flag [:c, :config], default_value: File.join(ENV["HOME"], ".shipit.yml"), desc: "Set the saved configuration path"
25
25
  flag [:e, :endpoint], desc: "Set the shipit API endpoint"
26
26
  flag [:p, :private_token], desc: "Set your private token to access the shipit API"
27
+ flag [:ship_skips_ci], default_value: false, desc: "Skip running the CI/CD after running `shipit work #`"
27
28
 
28
29
  # Switches
29
30
  switch :dry_run, default_value: false, desc: "Dry Run mode, no git or POST/PUT commands are run"
@@ -8,9 +8,9 @@ module Shipit
8
8
  #
9
9
  class Configuration
10
10
  # List of all the configuration attributes stored for use within the gem
11
- ATTRIBUTES = [:endpoint, :private_token, :protected_branches]
11
+ ATTRIBUTES = [:endpoint, :private_token, :protected_branches, :ship_skips_ci]
12
12
 
13
- attr_accessor :endpoint, :private_token, :protected_branches
13
+ attr_accessor :endpoint, :private_token, :protected_branches, :ship_skips_ci
14
14
 
15
15
  # Apply a configuration hash to a configuration instance
16
16
  #
@@ -3,7 +3,7 @@ require "yaml"
3
3
  module Shipit
4
4
  module Cli
5
5
  class ConfigurationFile
6
- ATTR_READER = [:endpoint, :private_token, :protected_branches]
6
+ ATTR_READER = [:endpoint, :private_token, :protected_branches, :ship_skips_ci]
7
7
  attr_reader(*ATTR_READER)
8
8
 
9
9
  def initialize(path, configuration = nil)
@@ -9,12 +9,12 @@ module Shipit
9
9
  new: {
10
10
  desc: "create new branch `branch`",
11
11
  commands: [
12
- '"#{GIT} push #{origin} #{current_branch}:refs/heads/#{branch} --no-verify #{VERBOSE}"',
12
+ '"#{GIT} push #{ship_skips_ci}#{origin} #{current_branch}:refs/heads/#{branch} --no-verify #{VERBOSE}"',
13
13
  '"#{GIT} fetch #{origin} #{VERBOSE}"',
14
14
  '"#{GIT} branch --track #{branch} #{origin}/#{branch} #{VERBOSE}"',
15
15
  '"#{GIT} checkout #{branch} #{VERBOSE}"',
16
16
  '"#{GIT} commit --allow-empty -m \"#{message}\" #{VERBOSE}"',
17
- '"#{GIT} push --no-verify #{VERBOSE}"'
17
+ '"#{GIT} push #{ship_skips_ci}--no-verify #{VERBOSE}"'
18
18
  ]
19
19
  }
20
20
  }
@@ -27,6 +27,7 @@ module Shipit
27
27
  origin = ORIGIN
28
28
  message = opt.fetch(:message, "").gsub("`", "'")
29
29
  dry_run = opt.fetch(:dry_run, false)
30
+ ship_skips_ci = "-o ci.skip " if Shipit::Cli.config.ship_skips_ci.to_s.downcase == "true"
30
31
  grepped_protected_branches = Array(Shipit::Cli.config.protected_branches)
31
32
  .push("master")
32
33
  .push("main")
@@ -1,5 +1,5 @@
1
1
  module Shipit
2
2
  module Cli
3
- VERSION = "1.2.0".freeze
3
+ VERSION = "1.3.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intello-shipit-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Thouret
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-09 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport