Skip to content

Commit

Permalink
Merge pull request #2011 from stashapp/develop
Browse files Browse the repository at this point in the history
Merge to master for v0.11.0 release
  • Loading branch information
WithoutPants authored Nov 15, 2021
2 parents 60c4f7e + 5f5cd03 commit 1096fe8
Show file tree
Hide file tree
Showing 739 changed files with 114,633 additions and 16,845 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,18 @@ jobs:
- name: Cache go build
uses: actions/cache@v2
env:
cache-name: cache-go-cache
# increment the number suffix to bump the cache
cache-name: cache-go-cache-1
with:
path: .go-cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('go.mod', '**/go.sum') }}

- name: Start build container
env:
official-build: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/develop') || (github.event_name == 'release' && github.ref != 'refs/tags/latest_develop') }}
run: |
mkdir -p .go-cache
docker run -d --name build --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated --mount type=bind,source="$(pwd)/.go-cache",target=/root/.cache/go-build,consistency=delegated -w /stash $COMPILER_IMAGE tail -f /dev/null
docker run -d --name build --mount type=bind,source="$(pwd)",target=/stash,consistency=delegated --mount type=bind,source="$(pwd)/.go-cache",target=/root/.cache/go-build,consistency=delegated --env OFFICIAL_BUILD=${{ env.official-build }} -w /stash $COMPILER_IMAGE tail -f /dev/null
- name: Pre-install
run: docker exec -t build /bin/bash -c "make pre-ui"
Expand Down
27 changes: 18 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,35 @@ linters:
- typecheck
- unused
- varcheck
# Linters added by the stash project
# - bodyclose
# Linters added by the stash project.
- dogsled
# - errorlint
- errorlint
# - exhaustive
- exportloopref
# - goconst
# - gocritic
- gocritic
# - goerr113
- gofmt
# - gosec
# - gomnd
# - ifshort
- misspell
# - nakedret
# - noctx
# - paralleltest
- noctx
- revive
- rowserrcheck
- sqlclosecheck

# Project-specific linter overrides
linters-settings:
gofmt:
simplify: false

errorlint:
# Disable errorf because there are false positives, where you don't want to wrap
# an error.
errorf: false
asserts: true
comparison: true

revive:
ignore-generated-header: true
severity: error
Expand Down Expand Up @@ -79,4 +84,8 @@ linters-settings:
- name: unused-parameter
disabled: true
- name: unreachable-code
- name: redefines-builtin-id
- name: redefines-builtin-id

rowserrcheck:
packages:
- github.com/jmoiron/sqlx
76 changes: 0 additions & 76 deletions .goreleaser.yml

This file was deleted.

117 changes: 0 additions & 117 deletions .travis.yml.disabled

This file was deleted.

9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ ifndef STASH_VERSION
$(eval STASH_VERSION := $(shell git describe --tags --exclude latest_develop))
endif

ifndef OFFICIAL_BUILD
$(eval OFFICIAL_BUILD := false)
endif

build: pre-build
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/pkg/api.version=$(STASH_VERSION)' -X 'github.com/stashapp/stash/pkg/api.buildstamp=$(BUILD_DATE)' -X 'github.com/stashapp/stash/pkg/api.githash=$(GITHASH)')
$(eval LDFLAGS := $(LDFLAGS) -X 'github.com/stashapp/stash/pkg/api.officialBuild=$(OFFICIAL_BUILD)')
go build $(OUTPUT) -mod=vendor -v -tags "sqlite_omit_load_extension osusergo netgo" $(GO_BUILD_FLAGS) -ldflags "$(LDFLAGS) $(EXTRA_LDFLAGS)"

# strips debug symbols from the release build
Expand Down Expand Up @@ -195,5 +200,5 @@ validate-backend: lint it

# locally builds and tags a 'stash/build' docker image
.PHONY: docker-build
docker-build:
docker build -t stash/build -f docker/build/x86_64/Dockerfile .
docker-build: pre-build
docker build --build-arg GITHASH=$(GITHASH) --build-arg STASH_VERSION=$(STASH_VERSION) -t stash/build -f docker/build/x86_64/Dockerfile .
Loading

0 comments on commit 1096fe8

Please sign in to comment.