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
#!/bin/bash | |
# echo "$pass" | sudo -S ./build.sh | |
# echo "$pass" | sudo -S ./build.sh --clean | |
# Builds a Raspbian lite image with some customizations include default locale, username, pwd, host name, boot setup customize etc. | |
# Must be run on Debian Buster or Ubuntu Xenial and requires some "horsepower". | |
SECONDS=0 | |
clean=false |
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
@echo off | |
if "%1" == "" goto usage | |
REM Expecting trailing \ on folders passed in | |
set artifactsFolder=%1 | |
set folderToBackup=%artifactsFolder%deployPackage\ | |
set zipLocation=%artifactsFolder% | |
set buildFolder=%~dp0 | |
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
function Invoke-Scripts($server, $user, $password) { | |
"Running scripts for $user on $server" | |
pushd $user | |
$files = @(gci | where {!$_.PsIsContainer}) | |
$count = 0 | |
foreach ($file in $files) { | |
write-progress -activity "Running scripts for $user" ` | |
-currentoperation $file.name -status Executing ` | |
-PercentComplete (100*$count++/$files.count) |
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
#!/bin/bash | |
# Bring system current | |
sudo apt-get update && sudo apt-get -y upgrade | |
# Install required pi-gen dependencies | |
sudo apt-get -y install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ | |
dosfstools bsdtar libcap2-bin grep rsync xz-utils file git curl bc | |
# Get pi-gen git repo |
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
param([string]$checkoutBranch = "develop") | |
function Get-AllRepos ([string]$checkoutBranch = "develop") | |
{ | |
Get-ChildItem -Recurse -Depth 2 -Force | | |
Where-Object { $_.Mode -match "h" -and $_.FullName -like "*\.git" } | | |
ForEach-Object { | |
$dir = Get-Item (Join-Path $_.FullName "../") | |
pushd $dir |
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
function Remove-MergedBranches | |
{ | |
Get-ChildItem -Recurse -Depth 2 -Force | | |
Where-Object { $_.Mode -match "h" -and $_.FullName -like "*\.git" } | | |
ForEach-Object { | |
$dir = Get-Item (Join-Path $_.FullName "../") | |
pushd $dir | |
"removing merged branches in $($dir.Name)" | |
git branch --merged | %{$_.trim()} | ?{$_ -notmatch 'develop' -and $_ -notmatch 'master'} | %{git branch -d $_} |
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
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[ValidateScript({ | |
if (-Not ($_ | Test-Path) ) { | |
throw "repos root path does not exist" | |
} | |
if (-Not ($_ | Test-Path -PathType Container) ) { | |
throw "Repos root must be a folder" | |
} |
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
function Remove-MergedBranches | |
{ | |
Get-ChildItem -Recurse -Depth 2 -Force | | |
Where-Object { $_.Mode -match "h" -and $_.FullName -like "*\.git" } | | |
ForEach-Object { | |
$dir = Get-Item (Join-Path $_.FullName "../") | |
pushd $dir | |
"removing merged branches in $($dir.Name)" | |
git branch --merged | %{$_.trim()} | ?{$_ -notmatch 'develop' -and $_ -notmatch 'master'} | %{git branch -d $_} |
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
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$false)] | |
[ValidateRange(1, 180)] | |
[int]$daysBack = 7, | |
[Parameter(Mandatory=$false)] | |
[string]$author, | |
[Parameter(Mandatory=$false)] |
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
ARG QEMU="false" | |
# Stage 1 - build | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.102 AS build | |
ARG QEMU | |
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1 | |
WORKDIR /build | |
COPY . . |
NewerOlder