Skip to content

Commit 0168ad7

Browse files
authored
Merge pull request #381 from slashdevops/chore-update
feat: improve the function exec_cmd
2 parents 567e0d2 + 2ef8ecc commit 0168ad7

File tree

10 files changed

+254
-319
lines changed

10 files changed

+254
-319
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: make test
4040

4141
- name: codecov coverage report
42-
uses: codecov/codecov-action@v4
42+
uses: codecov/codecov-action@v5
4343
with:
4444
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
4545
files: ./coverage.out

.github/workflows/codeql.yml

Lines changed: 0 additions & 100 deletions
This file was deleted.

.github/workflows/gosec.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
108108
- name: Create Release
109109
id: create-github-release
110-
uses: softprops/action-gh-release@v1
110+
uses: softprops/action-gh-release@v2
111111
with:
112112
tag_name: ${{ github.ref_name }}
113113
name: ${{ github.ref_name }}

Makefile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,30 @@ AWS_SAM_OS ?= linux
5656
AWS_SAM_ARCH ?= arm64
5757

5858
######## Functions ########
59-
# this is a funtion that will execute a command and print a message
59+
# this is a function that will execute a command and print a message
6060
# MAKE_DEBUG=true make <target> will print the command
6161
# MAKE_STOP_ON_ERRORS=true make any fail will stop the execution if the command fails, this is useful for CI
62-
# NOTE: if the dommand has a > it will print the output into the original redirect of the command
62+
# NOTE: if the command has a > it will print the output into the original redirect of the command
63+
MAKE_STOP_ON_ERRORS := false
64+
MAKE_DEBUG := false
65+
6366
define exec_cmd
6467
$(if $(filter $(MAKE_DEBUG),true),\
65-
$1 \
68+
${1} \
6669
, \
6770
$(if $(filter $(MAKE_STOP_ON_ERRORS),true),\
68-
@$1 > /dev/null 2>&1 && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
71+
@ERROR_OCCURRED=0; ${1} > /dev/null || ERROR_OCCURRED=1; if [ $$ERROR_OCCURRED -eq 0 ]; then printf " 🤞 ${1} ✅\n"; else printf " ${1} ❌ 🖕\n"; exit 1; fi \
6972
, \
7073
$(if $(findstring >, $1),\
71-
@$1 2>/dev/null && printf " 🤞 ${1} ✅\n" || printf " ${1} ❌ 🖕\n" \
74+
@${1} 2>/dev/null && printf " 🤞 ${1} ✅\n" || printf " ${1} ❌ 🖕\n" \
7275
, \
73-
@$1 > /dev/null 2>&1 && printf ' 🤞 ${1} ✅\n' || printf ' ${1} ❌ 🖕\n' \
76+
@${1} > /dev/null 2>&1 && printf ' 🤞 ${1} ✅\n' || printf ' ${1} ❌ 🖕\n' \
7477
) \
7578
) \
7679
)
7780

78-
endef # don't remove the whiteline before endef
81+
endef # don't remove the white space at the end of the line
82+
# this is a function that will execute a command and print a message
7983

8084
###############################################################################
8185
######## Targets ##############################################################

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# idp-scim-sync
22

33
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5348/badge)](https://bestpractices.coreinfrastructure.org/projects/5348)
4-
[![Gosec](https://github.com/slashdevops/idp-scim-sync/actions/workflows/gosec.yml/badge.svg?branch=main)](https://github.com/slashdevops/idp-scim-sync/actions/workflows/gosec.yml)
5-
[![Build](https://github.com/slashdevops/idp-scim-sync/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/slashdevops/idp-scim-sync/actions/workflows/build.yml)
4+
[![Build](https://github.com/slashdevops/idp-scim-sync/actions/workflows/build.yml/badge.svg)](https://github.com/slashdevops/idp-scim-sync/actions/workflows/build.yml)
65
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/slashdevops/idp-scim-sync?style=plastic)
76
[![Go Report Card](https://goreportcard.com/badge/github.com/slashdevops/idp-scim-sync)](https://goreportcard.com/report/github.com/slashdevops/idp-scim-sync)
87
[![license](https://img.shields.io/github/license/slashdevops/idp-scim-sync.svg)](https://github.com/slashdevops/idp-scim-sync/blob/main/LICENSE)

go.mod

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
module github.com/slashdevops/idp-scim-sync
22

3-
go 1.24.2
3+
go 1.24.3
44

55
require (
6-
github.com/aws/aws-lambda-go v1.47.0
6+
github.com/aws/aws-lambda-go v1.48.0
77
github.com/aws/aws-sdk-go-v2 v1.36.3
8-
github.com/aws/aws-sdk-go-v2/config v1.29.12
9-
github.com/aws/aws-sdk-go-v2/credentials v1.17.65
10-
github.com/aws/aws-sdk-go-v2/service/s3 v1.79.0
11-
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.35.2
8+
github.com/aws/aws-sdk-go-v2/config v1.29.14
9+
github.com/aws/aws-sdk-go-v2/credentials v1.17.67
10+
github.com/aws/aws-sdk-go-v2/service/s3 v1.79.4
11+
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.35.4
1212
github.com/google/go-cmp v0.7.0
1313
github.com/hashicorp/go-retryablehttp v0.7.7
1414
github.com/pkg/errors v0.9.1
1515
github.com/spf13/cobra v1.9.1
1616
github.com/spf13/viper v1.20.1
1717
github.com/stretchr/testify v1.10.0
18-
go.uber.org/mock v0.5.0
19-
golang.org/x/oauth2 v0.28.0
20-
google.golang.org/api v0.228.0
18+
go.uber.org/mock v0.5.2
19+
golang.org/x/oauth2 v0.30.0
20+
google.golang.org/api v0.234.0
2121
gopkg.in/yaml.v3 v3.0.1
2222
)
2323

2424
require (
25-
cloud.google.com/go/auth v0.15.0 // indirect
25+
cloud.google.com/go/auth v0.16.1 // indirect
2626
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
27-
cloud.google.com/go/compute/metadata v0.6.0 // indirect
27+
cloud.google.com/go/compute/metadata v0.7.0 // indirect
2828
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect
2929
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect
3030
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
3131
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
3232
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
3333
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect
3434
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
35-
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.0 // indirect
35+
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.7.2 // indirect
3636
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
3737
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.15 // indirect
38-
github.com/aws/aws-sdk-go-v2/service/sso v1.25.2 // indirect
39-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.0 // indirect
40-
github.com/aws/aws-sdk-go-v2/service/sts v1.33.17 // indirect
38+
github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect
39+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect
40+
github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect
4141
github.com/aws/smithy-go v1.22.3 // indirect
4242
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4343
github.com/felixge/httpsnoop v1.0.4 // indirect
44-
github.com/fsnotify/fsnotify v1.8.0 // indirect
44+
github.com/fsnotify/fsnotify v1.9.0 // indirect
4545
github.com/go-logr/logr v1.4.2 // indirect
4646
github.com/go-logr/stdr v1.2.2 // indirect
4747
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
4848
github.com/google/s2a-go v0.1.9 // indirect
4949
github.com/google/uuid v1.6.0 // indirect
5050
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
51-
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
51+
github.com/googleapis/gax-go/v2 v2.14.2 // indirect
5252
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
5353
github.com/inconshreveable/mousetrap v1.1.0 // indirect
54-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
54+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
5555
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
5656
github.com/sagikazarmark/locafero v0.9.0 // indirect
5757
github.com/sourcegraph/conc v0.3.0 // indirect
5858
github.com/spf13/afero v1.14.0 // indirect
59-
github.com/spf13/cast v1.7.1 // indirect
59+
github.com/spf13/cast v1.8.0 // indirect
6060
github.com/spf13/pflag v1.0.6 // indirect
6161
github.com/subosito/gotenv v1.6.0 // indirect
6262
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
63-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 // indirect
64-
go.opentelemetry.io/otel v1.34.0 // indirect
65-
go.opentelemetry.io/otel/metric v1.34.0 // indirect
66-
go.opentelemetry.io/otel/trace v1.34.0 // indirect
63+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
64+
go.opentelemetry.io/otel v1.35.0 // indirect
65+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
66+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
6767
go.uber.org/multierr v1.11.0 // indirect
68-
golang.org/x/crypto v0.36.0 // indirect
69-
golang.org/x/net v0.37.0 // indirect
70-
golang.org/x/sys v0.31.0 // indirect
71-
golang.org/x/text v0.23.0 // indirect
72-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
73-
google.golang.org/grpc v1.71.0 // indirect
68+
golang.org/x/crypto v0.38.0 // indirect
69+
golang.org/x/net v0.40.0 // indirect
70+
golang.org/x/sys v0.33.0 // indirect
71+
golang.org/x/text v0.25.0 // indirect
72+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250512202823-5a2f75b736a9 // indirect
73+
google.golang.org/grpc v1.72.1 // indirect
7474
google.golang.org/protobuf v1.36.6 // indirect
7575
)

0 commit comments

Comments
 (0)