Skip to content

Commit

Permalink
add dirty scripts from the dark side of the universe
Browse files Browse the repository at this point in the history
  • Loading branch information
a1vy committed Mar 28, 2024
1 parent 2aff87f commit 62cc5aa
Showing 1 changed file with 46 additions and 12 deletions.
58 changes: 46 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
<h1 id="published">published <a href="https://github.com/fiverr/published"><img src="https://img.shields.io/badge/source--000000.svg?logo=github&style=social" alt=""></a> <a href="https://www.npmjs.com/package/published"><img src="https://img.shields.io/npm/v/published.svg" alt=""></a> <a href="https://circleci.com/gh/fiverr/workflows/published/tree/master"><img src="https://circleci.com/gh/fiverr/published.svg?style=svg&circle-token=c887f45cd0a168ce3a1a304923f92bff11cccd81" alt=""></a></h1>
<h2 id="📦-opinionated-npm-publish-program-svg-xmlnshttpwwww3org2000svg-viewbox20-20-60-60-width100-height100-styledisplayblock-margin0-autoellipse-cx40625-cy55678-rx1875-ry2812ellipse-cx59375-cy55678-rx1875-ry2812path-dm575-65053h-15a937937-0-1-0-0-1876h15a937937-0-1-0-0-1876zpath-dm75312-42687v-011c0-048-021-092-027-137-011-072-011-145-04-214l6951-28143c-002-002-004-003-004-005a923923-0-0-0-687-544c-057-013-111-035-17-035l-009-002h31359l-011002c-044-0-084019-126025a935935-0-0-0-729553c0-002-002003-004005l-5735-14182c-027069-029139-038209-009049-029091-029143v317c0-518419938938938h4875a937937-0-0-0-938-938v42694l-001-007zm-25015-2122c-037-013-075-005-112-013a777777-0-0-0-363-001c-038007-078001-119015l-3066-1023v-2219h6727v2219l-3067-1024zm31993-29432h14104l-123-12307h-1785l4976-12307zm17069-12306h4675l123-12307h1082v12307zm1876-12306h1082l123-12307h-2312v29432zm4195-12306l-123-12307h14104l4977-12307h55133zm18305-317h26562v43613h18199v352c0-051020950291430070510021030181540040090140130170220611651673303406027022053037084057a923923-0-0-0-487156926926-0-0-0-296-048l50-46688l4005-1335a926926-0-0-0-296048908908-0-0-0-487-156c031-02057-035084-057a915915-0-0-0-303-406c003-009013-013017-022016-051011-103018-15401-048029-092029-143v-352h18199v29825zsvg">📦 Opinionated NPM publish program <svg xmlns="http://www.w3.org/2000/svg" viewBox="20 20 60 60" width="100" height="100" style="display:block; margin:0 auto"><ellipse cx="40.625" cy="55.678" rx="1.875" ry="2.812"/><ellipse cx="59.375" cy="55.678" rx="1.875" ry="2.812"/><path d="M57.5 65.053h-15a.937.937 0 1 0 0 1.876h15a.937.937 0 1 0 0-1.876z"/><path d="M75.312 42.687v-.011c0-.048-.021-.092-.027-.137-.011-.072-.011-.145-.04-.214L69.51 28.143c-.002-.002-.004-.003-.004-.005a.923.923 0 0 0-.687-.544c-.057-.013-.111-.035-.17-.035l-.009-.002H31.359l-.011.002c-.044 0-.084.019-.126.025a.935.935 0 0 0-.729.553c0 .002-.002.003-.004.005l-5.735 14.182c-.027.069-.029.139-.038.209-.009.049-.029.091-.029.143v31.7c0 .518.419.938.938.938h48.75a.937.937 0 0 0 .938-.938V42.694l-.001-.007zm-25.015 2.122c-.037-.013-.075-.005-.112-.013a.777.777 0 0 0-.363-.001c-.038.007-.078.001-.119.015l-3.066 1.023v-2.219h6.727v2.219l-3.067-1.024zM31.993 29.432h14.104l-1.23 12.307h-17.85l4.976-12.307zm17.069 12.306H46.75l1.23-12.307h1.082v12.307zm1.876-12.306h1.082l1.23 12.307h-2.312V29.432zm4.195 12.306l-1.23-12.307h14.104l4.977 12.307H55.133zm18.305 31.7H26.562V43.613h18.199v3.52c0 .051.02.095.029.143.007.051.002.103.018.154.004.009.014.013.017.022.061.165.167.3.303.406.027.022.053.037.084.057a.923.923 0 0 0 .487.156.926.926 0 0 0 .296-.048L50 46.688l4.005 1.335a.926.926 0 0 0 .296.048.908.908 0 0 0 .487-.156c.031-.02.057-.035.084-.057a.915.915 0 0 0 .303-.406c.003-.009.013-.013.017-.022.016-.051.011-.103.018-.154.01-.048.029-.092.029-.143v-3.52h18.199v29.825z"/></svg></h2>
<p>published helps streamline a git based workflow with package publishing through continues delivery. Developers control their branch and version strategies, and published takes care of logical conditioning of when to publish stable versions and/or release candidates.</p>
<h3 id="run-using-npx">Run using npx</h3>
<pre><code class="language-sh">npx published</code></pre>
<h3 id="run-without-installation">Run without installation</h3>
<pre><code class="language-sh">npx published@1</code></pre>
<p>OR</p>
<pre><code class="language-sh">npm exec published@1 --yes</code></pre>
<h3 id="options">Options</h3>
<table>
<thead>
Expand All @@ -29,47 +31,57 @@ <h3 id="options">Options</h3>
<tbody><tr>
<td>testing</td>
<td>Dry run</td>
<td><code>npx published --testing</code></td>
<td><code>npm exec published --yes -- --testing</code></td>
</tr>
<tr>
<td>slack.webhook</td>
<td>Notify on Slack</td>
<td><code>npx published --slack.webhook $SLACK_WEBHOOK</code></td>
<td><code>npm exec published --yes -- --slack.webhook $SLACK_WEBHOOK</code></td>
</tr>
<tr>
<td>slack.channel</td>
<td>Change Slack webhook channel</td>
<td><code>npx published --slack.webhook $SLACK_WEBHOOK --slack.channel &quot;#publish&quot;</code></td>
<td><code>npm exec published --yes -- --slack.webhook $SLACK_WEBHOOK --slack.channel &quot;#publish&quot;</code></td>
</tr>
<tr>
<td>quiet</td>
<td>Silent outputs and notifications</td>
<td><code>npx published --quiet</code></td>
<td><code>npm exec published --yes -- --quiet</code></td>
</tr>
<tr>
<td>git-tag</td>
<td>Push a tag to git, Only from <code>master</code>(latest-branch) or <code>latest</code> branch</td>
<td><code>npx published --git-tag</code></td>
<td><code>npm exec published --yes -- --git-tag</code></td>
</tr>
<tr>
<td>prefix-git-tag</td>
<td>Choose a prefix that will be prepend to git tag. Only from <code>master</code>(latest-branch) or <code>latest</code> branch</td>
<td><code>npm exec published --yes -- --git-tag --prefix-git-tag=my-prefix@</code></td>
</tr>
<tr>
<td>on-publish</td>
<td>Execute shell command after a publish event</td>
<td><code>npx published --on-publish bash\ ./do-more.sh</code></td>
<td><code>npm exec published --yes -- --on-publish bash\ ./do-more.sh</code></td>
</tr>
<tr>
<td>on-&lt;tag&gt;</td>
<td>Execute shell command after a publish event with this tag (executes after on-publish)</td>
<td><code>npx published --on-latest &#39;echo &quot;Published!&quot;&#39;</code></td>
<td><code>npm exec published --yes -- --on-latest &#39;echo &quot;Published!&quot;&#39;</code></td>
</tr>
<tr>
<td>latest-branch</td>
<td>Branch that is considered latest (default is &#39;master&#39;)</td>
<td><code>npx published --latest-branch stable</code></td>
<td><code>npm exec published --yes -- --latest-branch stable</code></td>
</tr>
<tr>
<td>tag-name</td>
<td>Tag name to be used regardless of config. If performed from a branch other than <code>master</code>, needs to be used in conjunction with <code>latest-branch</code> option</td>
<td><code>npx published --tag-name next --latest-branch next</code></td>
<td><code>npm exec published --yes -- --tag-name next --latest-branch next</code></td>
</tr>
<tr>
<td>no-sha</td>
<td>Disables the commit&#39;s SHA suffix for RC versions</td>
<td><code>npm exec published --yes -- --no-sha</code></td>
</tr>
</tbody></table>
<h2 id="tldr">TL;DR</h2>
Expand Down Expand Up @@ -100,7 +112,7 @@ <h2 id="flow">Flow</h2>
<h4 id="feature-branch">Feature branch</h4>
<ul>
<li>Publish only versions with a pre-release section containing <code>rc</code> string</li>
<li>Branch versions get a suffix that matches the commit ID, so you can re install the same tag and get updates</li>
<li>Unless the <code>--no-sha</code> flag was passed, branch versions get a suffix that matches the commit ID, so you can re install the same tag and get updates</li>
<li>Tags are named after the branch name</li>
</ul>
<h4 id="master-branch">&quot;master&quot; branch</h4>
Expand All @@ -123,49 +135,71 @@ <h3 id="examples">Examples</h3>
<th>version</th>
<th>publish</th>
<th>tag</th>
<th>w/o sha</th>
</tr>
</thead>
<tbody><tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.0</code></td>
<td>nothing</td>
<td>N/A</td>
<td>-</td>
</tr>
<tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.1-alpha</code></td>
<td>nothing</td>
<td>N/A</td>
<td>-</td>
</tr>
<tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.1-rc</code></td>
<td><code>1.3.1-rc</code></td>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td></td>
</tr>
<tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.1-rc.1</code></td>
<td><code>1.3.1-rc.1</code></td>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td></td>
</tr>
<tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.1-rc</code></td>
<td><code>1.3.1-rc-c447f6a</code></td>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td></td>
</tr>
<tr>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td><code>1.3.1-rc.1</code></td>
<td><code>1.3.1-rc.1-c447f6a</code></td>
<td><code>my_feature_branch</code>, <code>next</code></td>
<td></td>
</tr>
<tr>
<td><code>master</code>, <code>latest</code></td>
<td><code>1.3.0</code></td>
<td><code>1.3.0</code></td>
<td><code>latest</code></td>
<td>-</td>
</tr>
<tr>
<td><code>master</code>, <code>latest</code></td>
<td><code>1.3.0-beta</code></td>
<td>Throws Error</td>
<td>N/A</td>
<td>-</td>
</tr>
<tr>
<td><code>master</code>, <code>latest</code></td>
<td><code>1.3.0-rc</code></td>
<td>Throws Error</td>
<td>N/A</td>
<td>-</td>
</tr>
</tbody></table>
<blockquote>
Expand Down

0 comments on commit 62cc5aa

Please sign in to comment.