Skip to content

Commit

Permalink
bincapz is now malcontent (#464)
Browse files Browse the repository at this point in the history
* bincapz is now malcontent

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>

* Update SAMPLES_REPO

Signed-off-by: Evan Gibler <20933572+egibs@users.noreply.github.com>

* Update SAMPLES_COMMIT

Signed-off-by: Evan Gibler <20933572+egibs@users.noreply.github.com>

* One more bincapz reference

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>

---------

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: Evan Gibler <20933572+egibs@users.noreply.github.com>
  • Loading branch information
egibs authored Sep 23, 2024
1 parent b2104ef commit ac00332
Show file tree
Hide file tree
Showing 47 changed files with 400 additions and 437 deletions.
4 changes: 2 additions & 2 deletions .github/chainguard/release.sts.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
issuer: https://token.actions.githubusercontent.com
subject: repo:chainguard-dev/bincapz:ref:refs/heads/main
subject: repo:chainguard-dev/malcontent:ref:refs/heads/main
claim_pattern:
job_workflow_ref: chainguard-dev/bincapz/.github/workflows/(version|release).yaml@.*
job_workflow_ref: chainguard-dev/malcontent/.github/workflows/(version|release).yaml@.*

permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
tag:
if: ${{ github.repository }} == 'chainguard-dev/bincapz'
if: ${{ github.repository }} == 'chainguard-dev/malcontent'
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
Expand All @@ -24,7 +24,7 @@ jobs:
uses: octo-sts/action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
id: octo-sts
with:
scope: chainguard-dev/bincapz
scope: chainguard-dev/malcontent
identity: release
- name: Get Version
id: get-version
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
version:
if: ${{ github.repository }} == 'chainguard-dev/bincapz'
if: ${{ github.repository }} == 'chainguard-dev/malcontent'
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7
Expand All @@ -30,7 +30,7 @@ jobs:
uses: octo-sts/action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
id: octo-sts
with:
scope: chainguard-dev/bincapz
scope: chainguard-dev/malcontent
identity: release
- name: Update Version
id: update
Expand Down Expand Up @@ -67,15 +67,15 @@ jobs:
exit 1
fi
echo "Current bincapz version: $CURRENT_VERSION"
echo "New bincapz version: $VERSION"
echo "Current malcontent version: $CURRENT_VERSION"
echo "New malcontent version: $VERSION"
sed -i "s/ID string = \"v[0-9]*\.[0-9]*\.[0-9]*\"/ID string = \"${VERSION}\"/" ${{ env.VERSION_FILE }}
BRANCH="bincapz-version-bump-$VERSION"
BRANCH="malcontent-version-bump-$VERSION"
git checkout -b $BRANCH
git add ${{ env.VERSION_FILE }}
git commit -m "Bump bincapz version to $VERSION"
git commit -m "Bump malcontent version to $VERSION"
git push origin $BRANCH
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
Expand All @@ -84,4 +84,4 @@ jobs:
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
run: |
VERSION=${{ steps.update.outputs.VERSION }}
gh pr create -t "Update bincapz to $VERSION" -b "PR to update the version in ${{ env.VERSION_FILE }} to $VERSION" -B main
gh pr create -t "Update malcontent to $VERSION" -b "PR to update the version in ${{ env.VERSION_FILE }} to $VERSION" -B main
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ profiles/
# Jetbrains
.idea/

# Bincapz samples
# Malcontent samples
samples/
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
run:
# The default runtime timeout is 1m, which doesn't work well on Github Actions.
timeout: 10m
go: "1.22"
go: "1.23"

# NOTE: This file is populated by the lint-install tool. Local adjustments may be overwritten.
linters-settings:
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
project_name: bincapz
project_name: malcontent

before:
hooks:
- go mod tidy

builds:
- id: bincapz-build
binary: bincapz
- id: malcontent-build
binary: malcontent
main: ./
goos:
- darwin
Expand Down
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2024 Chainguard, Inc.
# SPDX-License-Identifier: Apache-2.0

# BEGIN: lint-install ../bincapz
# BEGIN: lint-install ../malcontent
# http://github.com/tinkerbell/lint-install

.PHONY: lint
Expand Down Expand Up @@ -45,10 +45,10 @@ _lint: $(LINTERS)
.PHONY: fix $(FIXERS)
fix: $(FIXERS)

# END: lint-install ../bincapz
# END: lint-install ../malcontent

SAMPLES_REPO ?= chainguard-dev/bincapz-samples
SAMPLES_COMMIT ?= b112eaf9bc547b2d219dfa775e0eff2874b30b9f
SAMPLES_REPO ?= chainguard-dev/malcontent-samples
SAMPLES_COMMIT ?= 84a2015439ad84d3005fa57d06d7a925acb9f2a3
OUT_DIR=out/samples-$(SAMPLES_COMMIT).tmp
out/samples-$(SAMPLES_COMMIT):
mkdir -p out
Expand All @@ -62,17 +62,17 @@ prepare-samples: out/samples-$(SAMPLES_COMMIT)

.PHONY: test
test: prepare-samples
go test $(shell go list ./... | grep -v test_data)
go test $(shell go list ./... | grep -Ev "samples|test_data")

.PHONY: bench
bench:
go test -run=^\$$ -bench=. ./... -benchmem

BENCH_CMD := go test -benchmem -run=^\$$ -bench ^BenchmarkRun\$$ github.com/chainguard-dev/bincapz/samples -args
BENCH_CMD := go test -benchmem -run=^\$$ -bench ^BenchmarkRun\$$ github.com/chainguard-dev/malcontent/samples -args

.PHONY: bench-bincapz
bench-bincapz:
$(BENCH_CMD) -path="macOS/clean/bincapz"
.PHONY: bench-malcontent
bench-malcontent:
$(BENCH_CMD) -path="macOS/clean/malcontent"

.PHONY: bench-all-samples
bench-all-samples:
Expand Down Expand Up @@ -114,18 +114,18 @@ bench-typescript:
bench-windows:
$(BENCH_CMD) -path="Windows"

.PHONY: out/bincapz
out/bincapz:
.PHONY: out/mal
out/mal:
mkdir -p out
go build -o out/bincapz .
go build -o out/mal .

.PHONY: update-third-party
update-third-party:
./third_party/yara/update.sh

.PHONY: refresh-sample-testdata out/bincapz
refresh-sample-testdata: out/samples-$(SAMPLES_COMMIT) out/bincapz
./test_data/refresh-testdata.sh ./out/bincapz out/samples-$(SAMPLES_COMMIT)
.PHONY: refresh-sample-testdata out/mal
refresh-sample-testdata: out/samples-$(SAMPLES_COMMIT) out/mal
./test_data/refresh-testdata.sh ./out/mal out/samples-$(SAMPLES_COMMIT)

ARCH ?= $(shell uname -m)
CRANE_VERSION=v0.20.2
Expand Down
Loading

0 comments on commit ac00332

Please sign in to comment.