diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 7e16ce5a..36486727 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ # These are supported funding model platforms -github: [obalunenko] +github: [ obalunenko ] diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 50366c20..4ac5ca15 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,22 +37,22 @@ jobs: # Learn more about CodeQL language support at https://git.io/codeql-language-support steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - - name: Build - run: | - make build + - name: Build + run: | + make build - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 447533c9..18bb8139 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,7 +5,7 @@ on: branches: - "master" pull_request: - types: [opened, synchronize, reopened] + types: [ opened, synchronize, reopened ] branches: - "*" paths: @@ -26,8 +26,8 @@ jobs: fail-fast: false max-parallel: 2 matrix: - os: ["ubuntu-22.04"] - go: ["1.19"] + os: [ "ubuntu-22.04" ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Build steps: @@ -83,8 +83,8 @@ jobs: fail-fast: false max-parallel: 2 matrix: - os: ["ubuntu-22.04"] - go: ["1.19"] + os: [ "ubuntu-22.04" ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Run Tests steps: @@ -130,8 +130,8 @@ jobs: fail-fast: false max-parallel: 2 matrix: - os: ["ubuntu-22.04"] - go: ["1.19"] + os: [ "ubuntu-22.04" ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Run linters steps: @@ -177,13 +177,13 @@ jobs: shell: bash reports: - needs: [linting, testing, build] + needs: [ linting, testing, build ] strategy: fail-fast: true max-parallel: 1 matrix: - os: ["ubuntu-22.04"] - go: ["1.19"] + os: [ "ubuntu-22.04" ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Quality reports steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2313ae24..e66650ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: max-parallel: 2 matrix: os: [ 'ubuntu-22.04' ] - go: [ '1.19' ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Build steps: @@ -60,7 +60,7 @@ jobs: max-parallel: 2 matrix: os: [ 'ubuntu-22.04' ] - go: [ '1.19' ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Regression tests steps: @@ -109,7 +109,7 @@ jobs: max-parallel: 1 matrix: os: [ 'ubuntu-22.04' ] - go: [ '1.19' ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Lint steps: @@ -156,13 +156,13 @@ jobs: shell: bash release: - needs: [build, regression_test, linting] + needs: [ build, regression_test, linting ] strategy: fail-fast: false max-parallel: 1 matrix: os: [ 'ubuntu-22.04' ] - go: [ '1.19' ] + go: [ "1.20" ] runs-on: ${{ matrix.os }} name: Release steps: diff --git a/.goreleaser.yml b/.goreleaser.yml index 95b7012a..8836e4d9 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -43,8 +43,7 @@ builds: ldflags: - "{{ .Env.GO_BUILD_LDFLAGS }}" universal_binaries: - - - # ID of the source build + - # ID of the source build # # Defaults to the project name. id: cli diff --git a/Makefile b/Makefile index 3d79b5c3..9ea14a95 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ APP_NAME?=instadiff-cli SHELL := env APP_NAME=$(APP_NAME) $(SHELL) -GOTOOLS_IMAGE_TAG?=v0.1.4 +GOTOOLS_IMAGE_TAG?=v0.2.1 SHELL := env GOTOOLS_IMAGE_TAG=$(GOTOOLS_IMAGE_TAG) $(SHELL) COMPOSE_TOOLS_FILE=deployments/docker-compose/go-tools-docker-compose.yml diff --git a/README.md b/README.md index 7cc8eb92..e503527e 100644 --- a/README.md +++ b/README.md @@ -90,15 +90,15 @@ Example of config file: ```json { - "instagram":{ - "whitelist":[ + "instagram": { + "whitelist": [ "user1", "user2", "user3", "1234567" ], - "limits":{ - "unfollow":100 + "limits": { + "unfollow": 100 }, "sleep": 7 }, @@ -113,15 +113,17 @@ Example of config file: ``` * instagram: it is a config for instagram - * whitelist: list of followings that will be not unfollowed even if they are not mutual (usernames and ID's supported both). + * whitelist: list of followings that will be not unfollowed even if they are not mutual (usernames and ID's + supported both). * limits: limits per one run. - * unfollow: number of users that could be unfollowed in one run (be careful with big number - account could be banned) + * unfollow: number of users that could be unfollowed in one run (be careful with big number - account could be + banned) * sleep: sleep interval in seconds between each unfollow request to prevent account ban for ddos reason. -* storage: it's a config for database storage. - * local: if true, memory cache will be used and connection to mongo will be not set. - * mongo: is a config for mongo database - - url: url of mongo DB to connect - - db: name of Database +* storage: it's a config for database storage. + * local: if true, memory cache will be used and connection to mongo will be not set. + * mongo: is a config for mongo database + - url: url of mongo DB to connect + - db: name of Database Create a json file with configuration and pass the path to it via flag `--config_path` diff --git a/go.mod b/go.mod index 53d1096c..568be299 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/obalunenko/instadiff-cli -go 1.19 +go 1.20 require ( github.com/Davincible/goinsta/v3 v3.2.6 diff --git a/scripts/linting/golangci-pipeline.sh b/scripts/linting/golangci-pipeline.sh index 5404b62b..7d4bdcd9 100755 --- a/scripts/linting/golangci-pipeline.sh +++ b/scripts/linting/golangci-pipeline.sh @@ -16,6 +16,6 @@ checkInstalled golangci-lint echo "Linting..." golangci-lint run --out-format=github-actions --no-config --disable-all -E govet -golangci-lint run --config .golangci.pipe.yml +golangci-lint run --timeout=10m --out-format=github-actions --config .golangci.pipe.yml echo "${SCRIPT_NAME} done." diff --git a/scripts/linting/golangci-sonar.sh b/scripts/linting/golangci-sonar.sh index 23e9d395..72eab45b 100755 --- a/scripts/linting/golangci-sonar.sh +++ b/scripts/linting/golangci-sonar.sh @@ -15,6 +15,6 @@ checkInstalled golangci-lint echo "Linting..." -golangci-lint run --config .golangci.yml > linters.out +golangci-lint run --timeout=10m --config .golangci.yml > linters.out echo "${SCRIPT_NAME} done."