Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Mar 30, 2023
1 parent db5f797 commit 8565ba1
Show file tree
Hide file tree
Showing 19 changed files with 1,485 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .editorconfig
@@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 3

[*.{bat,cmd}]
end_of_line = crlf

[*.{yml,yaml}]
indent_size = 2
132 changes: 132 additions & 0 deletions .gitattributes
@@ -0,0 +1,132 @@
# inspired by
# - https://github.com/alexkaratarakis/gitattributes/blob/master/Java.gitattributes
# - https://github.com/alexkaratarakis/gitattributes/blob/master/Common.gitattributes

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files with names NOT matching patterns defined below
#

# Git files
.gitattributes text eol=lf
**/.gitattributes text eol=lf
.gitignore text eol=lf
**/.gitignore text eol=lf


# Documents
*.doc binary diff=astextplain
*.docx binary diff=astextplain
*.dot binary diff=astextplain
*.pdf binary diff=astextplain
*.ppt binary diff=astextplain
*.pptx binary diff=astextplain
*.rtf binary diff=astextplain
*.vsd binary diff=astextplain
*.vsdx binary diff=astextplain
*.odt binary diff=odf
*.ods binary diff=odf
*.odp binary diff=odf
*.adoc text
*.csv text
*.md text diff=markdown
*.txt text


# Config/Serialisation
.editorconfig text
**/.editorconfig text
*.ini text
*.properties text
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text


# Scripts
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
*.hx text
*.lua text
*.php text
*.python text
*.sql text


# Archives
*.7z binary
*.gz binary
*.tar binary
*.tar.gz binary
*.tgz binary
*.xz binary
*.zip binary


# Native binaries
*.dll binary
*.dylib binary
*.exe binary
*.so binary


# Images
*.eps binary
*.gif binary
*.ico binary
*.jpg binary
*.jpeg binary
*.png binary
*.svg text
*.svgz binary
*.tif binary
*.tiff binary


# Fonts
*.eot binary
*.otf binary
*.ttf binary
*.woff binary


# Java
*.gradle text diff=java
*.gradle.kts text diff=java
*.java text diff=java
*.class binary
*.ear binary
*.jceks binary
*.jks binary
*.jar binary
*.pak binary
*.war binary
*.jsp text
*.jspf text
*.jspx text
*.tld text
*.tag text
*.tagx text


# Web
*.css text diff=css
*.htm text diff=html
*.html text diff=html
*.js text


# https://git-scm.com/docs/gitattributes#_export_ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,6 @@
*Issue #, if available:*

*Description of changes:*


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,16 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "09:00"
commit-message:
prefix: fix
prefix-development: chore
include: scope
labels:
- gha
- dependencies
24 changes: 24 additions & 0 deletions .github/stale.yml
@@ -0,0 +1,24 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60

# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7

# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security

# Label to use when marking an issue as stale
staleLabel: wontfix

# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
80 changes: 80 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,80 @@
# SPDX-FileCopyrightText: © Vegard IT GmbH (https://vegardit.com) and contributors
# SPDX-FileContributor: Sebastian Thomschke, Vegard IT GmbH
# SPDX-License-Identifier: Apache-2.0
# SPDX-ArtifactOfProjectHomePage: https://github.com/vegardit/scoop-portable
#
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
name: Build

on:
push:
branches: # build all branches
- '**'
tags-ignore: # but don't build tags
- '**'
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.editorconfig'
- '.git*'
- '.github/*.yml'
pull_request:
paths-ignore:
- '**/*.adoc'
- '**/*.md'
- '.editorconfig'
- '.git*'
- '.github/*.yml'
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

defaults:
run:
shell: cmd

jobs:
build:
runs-on: windows-latest
steps:
- name: "SCM Checkout"
uses: actions/checkout@v3 #https://github.com/actions/checkout

- name: Create Windows user 'noadmin'
run: |
net user noadmin p@ssw0rd /add
- name: Install sudo
run: |
curl -sSfL https://github.com/chrisant996/sudo-windows/releases/download/v1.0.3/sudo-x64-v1.0.3.c01d18-exe.zip -o sudo.zip
unzip sudo.zip -d C:\Windows\System32
# https://github.com/poweradminllc/PAExec
#- name: Install paexec
# run: curl -sSfL https://www.poweradmin.com/paexec/paexec.exe -o C:\Windows\System32\paexec.exe

- name: "Install: scoop-portable"
# installs scoop-portable as user "nonadmin"
run: |
cd tests
copy ..\scoop-portable.cmd .
:: paexec could be used as alternative to chris' sudo:
:: paexec -u noadmin -p p@ssw0rd -w %CD% cmd /c scoop-portable.cmd ^>log.txt
:: cat log.txt
echo p@ssw0rd| sudo -u noadmin --stdin cmd /c scoop-portable.cmd
- name: "Test: scoop-portable"
run: echo p@ssw0rd| sudo -u noadmin --stdin cmd /c "%CD%\tests\test-scoop.cmd"

- name: "Test: scoop-portable - different user and path"
# moves scoop-portable installation path and runs scoop-portable under different user
run: |
:: move scoop portable folder to another location
ren tests my_new_scoop_dir
:: load environment as different user (i.e. "runner")
my_new_scoop_dir\test-scoop.cmd
- name: "Test: scoop-portable - scoop update"
run: my_new_scoop_dir\test-update.cmd
44 changes: 44 additions & 0 deletions .gitignore
@@ -0,0 +1,44 @@
# Local work folder that is not checked in
_LOCAL/

#scoop
.portable
apps
buckets
cache
persist
shims
workspace
tests/scoop-portable.cmd

# Eclipse
.settings/
.project
**/.*.md.html

# IntelliJ
.idea
*.iml
*.ipr
*.iws

# Eclipse Theia
.theia

# Visual Studio Code
.vscode

# OSX
.DS_Store

# Vim
*.swo
*.swp

# Temp files
.history
*.tmp
*.bak
/dump
/target
/tools/dump

0 comments on commit 8565ba1

Please sign in to comment.