Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
fdfe35c5c3 | |||
9600cad3c7 | |||
07f65faec3 | |||
52a86492cd | |||
f4cd41739a | |||
c78b17d572 | |||
1b21d4704e | |||
c912f2b5cc | |||
e5a80aa013 | |||
7ab2d3f196 | |||
12f86f1338 | |||
454207d6ae |
121
.gitea/workflows/build.yml
Normal file
121
.gitea/workflows/build.yml
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
version: '1'
|
||||||
|
name: Release Version
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.23.1'
|
||||||
|
|
||||||
|
- name: Build Go binary for Linux
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
go build -o s3-client-web_linux.x86_64
|
||||||
|
|
||||||
|
- name: Build Go binary for Linux (x86)
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
GOARCH=386 go build -o s3-client-web_linux.x86
|
||||||
|
|
||||||
|
- name: Build Go binary for Linux (ARMv7)
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
GOARCH=arm go build -o s3-client-web_linux.armv7
|
||||||
|
|
||||||
|
- name: Build Go binary for Linux (ARM64)
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
GOARCH=arm64 go build -o s3-client-web_linux.arm64
|
||||||
|
|
||||||
|
- name: Build Go binary for Linux (RISC-V)
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
|
GOARCH=riscv64 go build -o s3-client-web_linux.riscv64
|
||||||
|
|
||||||
|
- name: Pack up binaries
|
||||||
|
run: |
|
||||||
|
tar -czvf s3-client-web-linux.x86_64.tar.gz s3-client-web_linux.x86_64 web
|
||||||
|
tar -czvf s3-client-web-linux.x86.tar.gz s3-client-web_linux.x86 web
|
||||||
|
tar -czvf s3-client-web-linux.armv7.tar.gz s3-client-web_linux.armv7 web
|
||||||
|
tar -czvf s3-client-web-linux.arm64.tar.gz s3-client-web_linux.arm64 web
|
||||||
|
tar -czvf s3-client-web-linux.riscv64.tar.gz s3-client-web_linux.riscv64 web
|
||||||
|
|
||||||
|
- name: Get latest commit ID
|
||||||
|
id: get_commit
|
||||||
|
run: |
|
||||||
|
commit_id=$(git rev-parse HEAD)
|
||||||
|
echo "commit_id=$commit_id" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get latest version and increment
|
||||||
|
id: create_version
|
||||||
|
run: |
|
||||||
|
if [ "${{ env.main_go_modified }}" = "false" ]; then
|
||||||
|
echo "No changes in main.go, skipping version increment and release creation."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git fetch --tags
|
||||||
|
|
||||||
|
latest_version=$(git tag | sort -V | tail -n 1 || echo "v0.0.0")
|
||||||
|
new_version=$(echo $latest_version | awk -F. '{printf "v%d.%d.%d", $1, $2, $3+1}')
|
||||||
|
|
||||||
|
while git rev-parse "$new_version" >/dev/null 2>&1; do
|
||||||
|
new_version=$(echo $new_version | awk -F. '{$3+=1; printf "v%d.%d.%d", $1, $2, $3}')
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "latest_version=$latest_version" >> $GITHUB_ENV
|
||||||
|
echo "new_version=$new_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
if git rev-parse "$new_version" >/dev/null 2>&1; then
|
||||||
|
echo "Tag $new_version already exists. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git tag $new_version
|
||||||
|
git push origin $new_version
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.new_version }}
|
||||||
|
release_name: Release ${{ env.new_version }}
|
||||||
|
release_description: |
|
||||||
|
Automatic release by Gitea CI
|
||||||
|
Release version ${{ env.new_version }}.
|
||||||
|
Commit ID: ${{ env.commit_id }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload Go binaries to release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./s3-client-web-linux.x86_64.tar.gz
|
||||||
|
./s3-client-web-linux.x86.tar.gz
|
||||||
|
./s3-client-web-linux.arm64.tar.gz
|
||||||
|
./s3-client-web-linux.armv7.tar.gz
|
||||||
|
./s3-client-web-linux.riscv64.tar.gz
|
||||||
|
|
||||||
|
tag_name: ${{ env.new_version }}
|
||||||
|
name: Release ${{ env.new_version }}
|
||||||
|
body: |
|
||||||
|
Automatic release by Gitea CI
|
||||||
|
Release version ${{ env.new_version }}.
|
||||||
|
Commit ID: ${{ env.commit_id }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.env
|
||||||
|
bin/*
|
||||||
|
s3-client*
|
16
LICENSE
Normal file
16
LICENSE
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
Copyright 2024 Leafus
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
|
associated documentation files (the “Software”), to deal in the Software without restriction,
|
||||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||||
|
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||||
|
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
|
||||||
|
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
38
README.md
Normal file
38
README.md
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
# S3 Client Web
|
||||||
|
|
||||||
|
This is a WebGUI for [s3-client](https://git.fluffy.pw/leafus/s3-client)
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Go (1.23.1 or later)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. Clone the repository:
|
||||||
|
```
|
||||||
|
git clone https://git.fluffy.pw/leafus/s3-client-web
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Go to the project directory:
|
||||||
|
```
|
||||||
|
cd s3-client-web
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Build the binary:
|
||||||
|
```
|
||||||
|
go build -o s3-client-web
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
In the .env file this is the only thing you can set
|
||||||
|
|
||||||
|
```
|
||||||
|
PORT=8080
|
||||||
|
```
|
||||||
|
|
||||||
|
### For this to even work
|
||||||
|
|
||||||
|
You need to download a latest linux binary release of [s3-client](https://git.fluffy.pw/leafus/s3-client) from the "Releases" tab for your architecture
|
||||||
|
|
||||||
|
and put the binary in the "bin" folder !IMPORTANT! you need to rename the file to just s3-client and create s3config.toml file, the configuration of that is in the [s3-client](https://git.fluffy.pw/leafus/s3-client) repository
|
|
@ -2,6 +2,23 @@ body {
|
||||||
background-color:#121212;
|
background-color:#121212;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
max-width: 50%;
|
||||||
|
margin: auto;
|
||||||
|
margin-top: 10vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
body {
|
||||||
|
max-width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="max-width: 50%; margin: auto; margin-top: 10vh">
|
<body>
|
||||||
<div class="header">S3-Client WebGUI</div>
|
<div class="header">S3-Client WebGUI</div>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<div style="margin-top: 10px;">
|
<div style="margin-top: 10px;" class="footer">
|
||||||
<a href="https://git.fluffy.pw/leafus/s3-client">[ s3-client ]</a> -
|
<a href="https://git.fluffy.pw/leafus/s3-client">[ s3-client ]</a> -
|
||||||
<a href="https://git.fluffy.pw/leafus/s3-client-web">[ s3-client-web ]</a> - Licensed under MIT
|
<a href="https://git.fluffy.pw/leafus/s3-client-web">[ s3-client-web ]</a> - Licensed under MIT
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user