yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
[CmdletBinding()] | |
param ( | |
[String]$Registry, | |
[SecureString]$Token | |
) | |
$SampleRegistry = 'For example: //pkgs.dev.azure.com/project/npm/registry/' | |
function Validate-Registry { | |
param ( |
// https://hub.docker.com/layers/gittools/gitversion/5.8.1-alpine.3.14-6.0-amd64/images/sha256-ca0a8c928333b55e976b8c1f7e33b34a9b0884598adad92be2d2e1234b9b28c2?context=explore | |
scripts { | |
def gitversionJson = sh label: 'Running GitVersion.', returnStdout: true, script: 'docker run --rm -v "$(pwd):/repo" gittools/gitversion:5.8.1-alpine.3.14-6.0-amd64 /repo' | |
try { | |
def gitversionMap = new groovy.json.JsonSlurperClassic().parseText(gitversionJson) | |
gitversionMap.each { k, v -> env["${prefix}${k}"] = "${v}" } | |
} catch (Exception ex) { | |
echo "GitVersion output: \n${gitversionJson}" | |
error ex.getMessage() |
schemaVersion: "2.0.0" | |
commandTests: | |
- name: "git cli" | |
command: "git" | |
args: ["--version"] | |
expectedOutput: ["git version 2.25.1"] | |
- name: "Check path" | |
command: "pwd" | |
# args: | |
# - -c |
yUML is a simple tool for embedding UML diagrams in wikis and blogs without needing any UML or diagramming tools.
Here's an idea of how it could be used in your repository readme.markdown or wiki.
View the RAW source to see how images are made.
# https://gist.github.com/dingzeyuli/f07c126b74371adba4b7dbe181cb57d2 | |
# Tested on PowerShell-Core 7.1.3 | |
If ( 'https://github.com/torvalds/linux.git' -match '([^/]+/[^/]+?)(?:\.git)' ) { Invoke-RestMethod "https://api.github.com/repos/$($Matches[1])" | Select-Object -Property size } | |
# Output: (in bytes) | |
# size | |
# ---- | |
# 3262068 |
#requires -Version 2 -Modules posh-git | |
function Write-Theme { | |
param( | |
[bool] | |
$lastCommandFailed, | |
[string] | |
$with | |
) |
private boolean isSandbox() { | |
def locationConfig = jenkins.model.JenkinsLocationConfiguration.get() | |
if (System.getenv("ENVIRONMENT") == "sandbox") { | |
true | |
} else if (locationConfig != null && locationConfig.getUrl() != null) { | |
locationConfig.getUrl().contains("staging") | |
} else { | |
false | |
} | |
} |
enum PatchLevel { | |
MAJOR, MINOR, PATCH | |
} | |
class SemVer implements Serializable { | |
private int major, minor, patch | |
SemVer(String version) { | |
def versionParts = version.tokenize('.') |
//Problem: | |
//languages like tcl can simply switch between the String representation of a map or list and the | |
//object itself. In Groovy, this could theoretically work, but it doesn't: | |
def list1 = [1,2,3] | |
def list2 = ["1, 2, 3"] | |
assert list1 != list2 | |
assert list1.toString() == list2.toString() | |
assert Eval.me(list1.toString()) instanceof List | |
assert Eval.me(list2.toString()) instanceof List | |
assert Eval.me(list1.toString()) == Eval.me(list2.toString()) |
# This property allows you to bump the next version explicitly. Also serves as base version. | |
# Uncomment to use. For more details: https://confluence.3shape.com/x/L44_C | |
#next-version: | |
# DEKA-817: Using standard GitVersion commit message to increment SemVer | |
# For complete instructions on how to use this, see https://confluence.3shape.com/x/00zfBw | |
commit-message-incrementing: Enabled | |
major-version-bump-message: '\+semver:\s?(breaking|major)' | |
minor-version-bump-message: '\+semver:\s?(feature|minor)' | |
patch-version-bump-message: '\+semver:\s?(fix|patch)' |