From 8f75c663aa0f059a96c1c82629f5ab18cdcd04d5 Mon Sep 17 00:00:00 2001 From: Daniel Demus Date: Sun, 5 Jan 2025 16:33:28 +0100 Subject: [PATCH] Initial commit --- .gitignore | 37 +++++++++++ LICENSE | 9 +++ README.md | 2 + golang-github-rhysd-actionlint.spec | 98 +++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 golang-github-rhysd-actionlint.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a304625 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# ---> VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# ---> Go +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..46b1fa5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2025 demus + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f1ae266 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# golang-github-rhysd-actionlint-rpm + diff --git a/golang-github-rhysd-actionlint.spec b/golang-github-rhysd-actionlint.spec new file mode 100644 index 0000000..2246066 --- /dev/null +++ b/golang-github-rhysd-actionlint.spec @@ -0,0 +1,98 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# https://github.com/rhysd/actionlint +%global goipath github.com/rhysd/actionlint +Version: 1.7.5 + +%gometa -f -i + +%global common_description %{expand: +:octocat: Static checker for GitHub Actions workflow files.} + +%global golicenses LICENSE.txt +%global godocs docs CHANGELOG.md CONTRIBUTING.md README.md\\\ + fuzz/README.md playground/README.md scripts/check-\\\ + checks/README.md scripts/generate-actionlint-\\\ + matcher/README.md scripts/generate-\\\ + availability/README.md scripts/generate-popular-\\\ + actions/README.md scripts/generate-webhook-\\\ + events/README.md + +Name: golang-github-rhysd-actionlint +Release: %autorelease +Summary: :octocat: Static checker for GitHub Actions workflow files + +License: MIT +URL: %{gourl} +Source: %{gosource} + +%description %{common_description} + +%gopkg + +%prep +%goprep -A +%dnl %autopatch -p1 + +%if %{without bootstrap} +%generate_buildrequires +%go_generate_buildrequires +%endif + +%if %{without bootstrap} +%build +for cmd in cmd/* ; do + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd +done +for cmd in scripts/check-checks scripts/generate-availability scripts/generate-popular-actions scripts/generate-webhook-events; do + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd +done +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE.txt +%doc docs CHANGELOG.md CONTRIBUTING.md README.md fuzz/README.md +%doc playground/README.md scripts/check-checks/README.md +%doc scripts/generate-actionlint-matcher/README.md +%doc scripts/generate-availability/README.md +%doc scripts/generate-popular-actions/README.md +%doc scripts/generate-webhook-events/README.md +# REMOVE BEFORE SUBMITTING THIS FOR REVIEW +# --- +# New Fedora packages should not use globs to avoid installing conflicting +# binaries. +# Write a _bindir line per each of the binaries the package will install. +# --- +# REMOVE BEFORE SUBMITTING THIS FOR REVIEW +%{_bindir}/* +%endif + +%gopkgfiles + +%changelog +%autochangelog