-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config to manage release tags and allow tag suffix for a train (#573
- Loading branch information
Showing
10 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<article data-controller="reveal"> | ||
<div class="text-xl text-slate-600 font-medium mt-2 mb-1">Tag Your Releases</div> | ||
<div class="text-sm mt-1 mb-6"> | ||
By default, a tag is created at the end of the release with the final version of the release.<br/> | ||
You can turn of creation of tag. Or, you can add an optional suffix to your tags. | ||
</div> | ||
<section data-controller="toggle-switch" | ||
data-toggle-switch-on-label-value="Release Tag enabled" | ||
data-toggle-switch-off-label-value="Release Tag disabled"> | ||
<div class="flex items-center"> | ||
<div class="form-switch"> | ||
<%= form.check_box :tag_releases, | ||
{ id: "tag_releases-switch", | ||
class: "sr-only", | ||
data: { action: "toggle-switch#change reveal#toggle", | ||
toggle_switch_target: "checkbox" } }, | ||
"true", "false" %> | ||
<label class="bg-slate-400" for="tag_releases-switch"> | ||
<span class="bg-white shadow-sm" aria-hidden="true"></span> | ||
<span class="sr-only">Switch label</span> | ||
</label> | ||
</div> | ||
|
||
<div class="text-sm text-slate-600 ml-2" data-toggle-switch-target="output"></div> | ||
</div> | ||
|
||
<section class="mt-6" data-reveal | ||
<%= "hidden" unless @train.tag_releases? %> data-controller="help-text"> | ||
<div data-controller="domain--release-suffix-help" | ||
data-domain--release-suffix-help-version-value="<%= @train.version_current || @train.version_seeded_with %>" | ||
data-domain--release-suffix-help-version-suffix-current-value="<%= @train.tag_suffix %>" | ||
data-domain--release-suffix-help-prefix-value="v"> | ||
<%= form.label :tag_suffix, class: "block text-sm font-medium mb-1" %> | ||
<%= form.text_field :tag_suffix, | ||
class: "form-input w-full", | ||
placeholder: "Eg: nightly", | ||
autocomplete: "off", | ||
data: { domain__release_suffix_help_target: "input", | ||
action: "domain--release-suffix-help#set" } %> | ||
<div class="text-sm mt-1"> | ||
This is appended to the <strong>tag name</strong> of the release, as follows: | ||
<span class="font-mono" data-domain--release-suffix-help-target="helpText"></span> | ||
</div> | ||
</div> | ||
</section> | ||
</section> | ||
<div class="border-t border-dashed border-slate-200 pb-8 mt-8"></div> | ||
</article> |
10 changes: 10 additions & 0 deletions
10
db/migrate/20231020054546_add_config_to_tag_release_to_train.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class AddConfigToTagReleaseToTrain < ActiveRecord::Migration[7.0] | ||
def change | ||
safety_assured do | ||
change_table :trains, bulk: true do |t| | ||
t.column :tag_releases, :boolean, default: true | ||
t.column :tag_suffix, :string | ||
end | ||
end | ||
end | ||
end |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters