Skip to content

Commit fbad86b

Browse files
Merge pull request #181 from InfiniteTF/master-fix
Push current production version to master
2 parents 310a66f + b809e5e commit fbad86b

File tree

506 files changed

+69075
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+69075
-3
lines changed

.dockerignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
####
15+
# Visual Studio Code
16+
####
17+
.vscode
18+
19+
####
20+
# Jetbrains
21+
####
22+
23+
# User-specific stuff
24+
.idea/**/workspace.xml
25+
.idea/**/tasks.xml
26+
.idea/**/usage.statistics.xml
27+
.idea/**/dictionaries
28+
.idea/**/shelf
29+
30+
# Generated files
31+
.idea/**/contentModel.xml
32+
33+
# Sensitive or high-churn files
34+
.idea/**/dataSources/
35+
.idea/**/dataSources.ids
36+
.idea/**/dataSources.local.xml
37+
.idea/**/sqlDataSources.xml
38+
.idea/**/dynamic.xml
39+
.idea/**/uiDesigner.xml
40+
.idea/**/dbnavigator.xml
41+
42+
# Vim
43+
*.swp
44+
45+
####
46+
# Random
47+
####
48+
49+
frontend/node_modules/*
50+
frontend/build/*
51+
52+
*.db
53+
54+
stashdb
55+
stash-box
56+
dist
57+
58+
pkg/models/generated_*.go
59+
# TODO - we'll add this in later
60+
vendor
61+
docker

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
go.mod text eol=lf
2+
go.sum text eol=lf

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
# patreon: # Replace with a single Patreon username
5+
open_collective: stashapp
6+
# ko_fi: # Replace with a single Ko-fi username
7+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
# liberapay: StashApp
10+
# issuehunt: # Replace with a single IssueHunt username
11+
# otechie: # Replace with a single Otechie username
12+
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[Bug Report] Short Form Subject (50 Chars or less)"
5+
labels: help wanted
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem please ensure that your screenshots are SFW or at least appropriately censored.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Discussion / Request for Commentary [RFC]
3+
about: This is for issues that will be discussed and won't necessarily result directly
4+
in commits or pull requests.
5+
title: "[RFC] Short Form Title"
6+
labels: help wanted
7+
assignees: ''
8+
9+
---
10+
11+
<!-- Update or delete the title if you need to delegate your title gore to something
12+
# Title
13+
14+
*### Scope*
15+
<!-- describe the scope of your topic and your goals ideally within a single paragraph or TL;DR kind of summary so its easier for people to determine if they can contribute at a glance. -->
16+
17+
## Long Form
18+
<!-- Only required if your scope and titles can't cover everything. -->
19+
20+
## Examples
21+
<!-- if you can show a picture or video examples post them here, please ensure that you respect people's time and attention and understand that people are volunteering their time, so concision is ideal and considerate. -->
22+
23+
## Reference Reading
24+
<!-- if there is any reference reading or documentation, please refer to it here. -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[Feature] Short Form Title (50 chars or less.)"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/build.yml

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ develop, master ]
6+
pull_request:
7+
branches: [ develop ]
8+
release:
9+
types: [ published ]
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-20.04
14+
15+
services:
16+
postgres:
17+
image: postgres:13.2
18+
env:
19+
POSTGRES_DB: postgres
20+
POSTGRES_PASSWORD: postgres
21+
POSTGRES_USER: postgres
22+
ports:
23+
- 5432:5432
24+
# Set health checks to wait until postgres has started
25+
options: >-
26+
--health-cmd pg_isready
27+
--health-interval 10s
28+
--health-timeout 5s
29+
--health-retries 5
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Install Go
38+
uses: actions/setup-go@v2
39+
with:
40+
go-version: 1.16.x
41+
42+
- name: Install Node
43+
uses: actions/setup-node@v2
44+
with:
45+
node-version: '14'
46+
47+
- name: Cache node modules
48+
uses: actions/cache@v2
49+
env:
50+
cache-name: cache-node_modules
51+
with:
52+
path: frontend/node_modules
53+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('frontend/yarn.lock') }}
54+
55+
- name: Cache UI build
56+
uses: actions/cache@v2
57+
id: cache-ui
58+
env:
59+
cache-name: cache-ui
60+
with:
61+
path: frontend/build
62+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('frontend/yarn.lock', 'frontend/public/**', 'frontend/src/**', 'graphql/**/*.graphql') }}
63+
64+
- name: Cache go build
65+
uses: actions/cache@v2
66+
env:
67+
cache-name: cache-go-cache
68+
with:
69+
path: .go-cache
70+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
71+
72+
- name: Pre-install
73+
run: make pre-ui
74+
75+
- name: Validate UI
76+
# skip UI validation for pull requests if UI is unchanged
77+
if: ${{ github.event_name != 'pull_request' || steps.cache-ui.outputs.cache-hit != 'true' }}
78+
run: make ui-validate
79+
80+
- name: Generate
81+
run: make generate
82+
83+
- name: Build UI
84+
# skip UI build for pull requests if UI is unchanged (UI was cached)
85+
# this means that the build version/time may be incorrect if the UI is
86+
# not changed in a pull request
87+
if: ${{ github.event_name != 'pull_request' || steps.cache-ui.outputs.cache-hit != 'true' }}
88+
run: make ui
89+
90+
- name: Run tests
91+
env:
92+
POSTGRES_DB: postgres:postgres@localhost/postgres?sslmode=disable
93+
run: make lint it
94+
95+
- name: Crosscompile binaries
96+
run: make cross-compile
97+
98+
- name: Generate checksums
99+
run: |
100+
git describe --tags --exclude latest_develop | tee CHECKSUMS_SHA1
101+
sha1sum dist/*/stash-box-* | sed 's/dist\/.*\///g' | tee -a CHECKSUMS_SHA1
102+
echo "STASH_BOX_VERSION=$(git describe --tags --exclude latest_develop)" >> $GITHUB_ENV
103+
echo "RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')" >> $GITHUB_ENV
104+
105+
- name: Upload Windows binary
106+
# only upload binaries for pull requests
107+
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
108+
uses: actions/upload-artifact@v2
109+
with:
110+
name: stash-box-win.exe
111+
path: dist/stash-box_windows_amd64/stash-box-windows.exe
112+
- name: Upload OSX binary
113+
# only upload binaries for pull requests
114+
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
115+
uses: actions/upload-artifact@v2
116+
with:
117+
name: stash-box-darwin
118+
path: dist/stash-box_darwin_amd64/stash-box-darwin
119+
- name: Upload Linux binary
120+
# only upload binaries for pull requests
121+
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'refs/heads/develop' && github.base_ref != 'refs/heads/master'}}
122+
uses: actions/upload-artifact@v2
123+
with:
124+
name: stash-box-linux
125+
path: dist/stash-box_static_linux_amd64/stash-box-linux
126+
127+
- name: Update latest_develop tag
128+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
129+
run : git tag -f latest_develop; git push -f --tags
130+
- name: Development Release
131+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
132+
uses: meeDamian/[email protected]
133+
with:
134+
token: "${{ secrets.GITHUB_TOKEN }}"
135+
prerelease: true
136+
allow_override: true
137+
tag: latest_develop
138+
name: "${{ env.STASH_BOX_VERSION }}: Latest development build"
139+
body: "**${{ env.RELEASE_DATE }}**\n This is always the latest committed version on the develop branch. Use as your own risk!"
140+
files: |
141+
dist/stash-box_windows_amd64/stash-box-windows.exe
142+
dist/stash-box_static_linux_amd64/stash-box-linux
143+
dist/stash-box_darwin_amd64/stash-box-darwin
144+
CHECKSUMS_SHA1
145+
gzip: false
146+
- name: Master release
147+
if: ${{ github.event_name == 'release' && github.ref != 'refs/tags/latest_develop' }}
148+
uses: meeDamian/[email protected]
149+
with:
150+
token: "${{ secrets.GITHUB_TOKEN }}"
151+
allow_override: true
152+
files: |
153+
dist/stash-box_windows_amd64/stash-box-windows.exe
154+
dist/stash-box_static_linux_amd64/stash-box-linux
155+
dist/stash-box_darwin_amd64/stash-box-darwin
156+
CHECKSUMS_SHA1
157+
gzip: false
158+
159+
- name: Login to DockerHub
160+
if: ${{ github.event_name != 'pull_request' }}
161+
uses: docker/login-action@v1
162+
with:
163+
username: ${{ secrets.DOCKERHUB_USERNAME }}
164+
password: ${{ secrets.DOCKERHUB_TOKEN }}
165+
166+
- name: Development Docker
167+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
168+
run: |
169+
docker build -t stashapp/stash-box:development -f ./docker/ci/x86_64/Dockerfile ./dist
170+
docker push stashapp/stash-box:development
171+
172+
- name: Release Docker
173+
if: ${{ github.event_name == 'release' && github.ref != 'refs/tags/latest_develop' }}
174+
run: |
175+
docker build -t stashapp/stash-box:latest -f ./docker/ci/x86_64/Dockerfile ./dist
176+
docker push stashapp/stash-box:latest

0 commit comments

Comments
 (0)