Compare commits
10 commits
6ac10a9ee7
...
db6d4a34b9
Author | SHA1 | Date | |
---|---|---|---|
Aravinth Manivannan | db6d4a34b9 | ||
Aravinth Manivannan | 381b043b37 | ||
Aravinth Manivannan | a5052f5ac8 | ||
Aravinth Manivannan | 803ce44707 | ||
Aravinth Manivannan | d4b10bed24 | ||
7942e1ad61 | |||
Aravinth Manivannan | 762f1b34b9 | ||
Aravinth Manivannan | deed09f9fa | ||
Aravinth Manivannan | d6f9255398 | ||
Aravinth Manivannan | e3c79d9b36 |
3
.github/workflows/coverage.yml
vendored
3
.github/workflows/coverage.yml
vendored
|
@ -98,8 +98,6 @@ jobs:
|
||||||
# run: make frontend
|
# run: make frontend
|
||||||
|
|
||||||
- name: Generate coverage file
|
- name: Generate coverage file
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
#if: (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
|
||||||
uses: actions-rs/tarpaulin@v0.1
|
uses: actions-rs/tarpaulin@v0.1
|
||||||
with:
|
with:
|
||||||
args: "-t 1200"
|
args: "-t 1200"
|
||||||
|
@ -114,5 +112,4 @@ jobs:
|
||||||
COMPILED_DATE: "2021-07-21"
|
COMPILED_DATE: "2021-07-21"
|
||||||
|
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v2
|
||||||
|
|
8
.github/workflows/linux.yml
vendored
8
.github/workflows/linux.yml
vendored
|
@ -77,7 +77,7 @@ jobs:
|
||||||
|
|
||||||
- name: configure GPG key
|
- name: configure GPG key
|
||||||
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'realaravinth/dumbserve'
|
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'realaravinth/dumbserve'
|
||||||
run: echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --import
|
run: echo -n "$RELEASE_BOT_GPG_SIGNING_KEY" | gpg --batch --import --pinentry-mode loopback
|
||||||
env:
|
env:
|
||||||
RELEASE_BOT_GPG_SIGNING_KEY: ${{ secrets.RELEASE_BOT_GPG_SIGNING_KEY }}
|
RELEASE_BOT_GPG_SIGNING_KEY: ${{ secrets.RELEASE_BOT_GPG_SIGNING_KEY }}
|
||||||
|
|
||||||
|
@ -126,7 +126,11 @@ jobs:
|
||||||
|
|
||||||
- name: publish bins
|
- name: publish bins
|
||||||
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'realaravinth/dumbserve'
|
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'realaravinth/dumbserve'
|
||||||
run: ./scripts/publish.sh master latest
|
run: ./scripts/publish.sh publish master latest $DUMBSERVE_USERNAME $DUMBSERVE_PASSWORD
|
||||||
|
env:
|
||||||
|
DUMBSERVE_USERNAME: ${{ secrets.DUMBSERVE_USERNAME }}
|
||||||
|
DUMBSERVE_PASSWORD: ${{ secrets.DUMBSERVE_PASSWORD }}
|
||||||
|
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
|
||||||
|
|
||||||
- name: generate documentation
|
- name: generate documentation
|
||||||
if: matrix.version == 'stable' && (github.repository == 'realaravinth/dumbserve')
|
if: matrix.version == 'stable' && (github.repository == 'realaravinth/dumbserve')
|
||||||
|
|
650
Cargo.lock
generated
650
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -17,21 +17,23 @@
|
||||||
# publish.sh: grab bin from docker container, pack, sign and upload
|
# publish.sh: grab bin from docker container, pack, sign and upload
|
||||||
# $2: binary version
|
# $2: binary version
|
||||||
# $3: Docker img tag
|
# $3: Docker img tag
|
||||||
# $4: dummyserve username
|
# $4: dumbserve username
|
||||||
# $5: dummyserve password
|
# $5: dumbserve password
|
||||||
|
|
||||||
set -xEeuo pipefail
|
set -xEeuo pipefail
|
||||||
|
|
||||||
DUMBSERVE_USERNAME=$4
|
DUMBSERVE_USERNAME=$4
|
||||||
DUMBSERVE_PASSWORD=$5
|
DUMBSERVE_PASSWORD=$5
|
||||||
DUMBSERVE_HOST="https://$DUMBSERVE_USERNAME:$DUMBSERVE_PASSWORD@dl.batsense.net"
|
DUMBSERVE_HOST="https://$DUMBSERVE_USERNAME:$DUMBSERVE_PASSWORD@dl.librepages.org"
|
||||||
|
|
||||||
NAME=dummyserve
|
NAME=dumbserve
|
||||||
|
KEY=7981CA5AE57350D9F9BF5F6456CB9AF170E4A02F
|
||||||
|
|
||||||
TMP_DIR=$(mktemp -d)
|
TMP_DIR=$(mktemp -d)
|
||||||
FILENAME="$NAMe-$2-linux-amd64"
|
FILENAME="$NAME-$2-linux-amd64"
|
||||||
TARBALL="$FILENAME.tar.gz"
|
TARBALL=$FILENAME.tar.gz
|
||||||
TARGET_DIR="$TMP_DIR/$FILENAME"
|
TARGET_DIR="$TMP_DIR/$FILENAME/"
|
||||||
|
mkdir -p $TARGET_DIR
|
||||||
DOCKER_IMG="realaravinth/$NAME:$3"
|
DOCKER_IMG="realaravinth/$NAME:$3"
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,29 +48,43 @@ copy() {
|
||||||
echo "[*] Copying dist assets"
|
echo "[*] Copying dist assets"
|
||||||
cp README.md $TARGET_DIR
|
cp README.md $TARGET_DIR
|
||||||
cp LICENSE.md $TARGET_DIR
|
cp LICENSE.md $TARGET_DIR
|
||||||
cp CHANGELOG.md $TARGET_DIR
|
# cp CHANGELOG.md $TARGET_DIR
|
||||||
cp docker-compose.yml $TARGET_DIR
|
# cp docker-compose.yml $TARGET_DIR
|
||||||
|
|
||||||
mkdir $TARGET_DIR/docs
|
# mkdir $TARGET_DIR/docs
|
||||||
cp docs/DEPLOYMENT.md $TARGET_DIR/docs
|
# cp docs/DEPLOYMENT.md $TARGET_DIR/docs
|
||||||
cp docs/CONFIGURATION.md $TARGET_DIR/docs
|
# cp docs/CONFIGURATION.md $TARGET_DIR/docs
|
||||||
|
|
||||||
get_bin
|
get_bin
|
||||||
}
|
}
|
||||||
|
|
||||||
pack() {
|
pack() {
|
||||||
echo "[*] Creating dist tarball"
|
echo "[*] Creating dist tarball"
|
||||||
tar -cvzf $TARBALL $TARGET_DIR
|
pushd $TMP_DIR
|
||||||
|
tar -cvzf $TARBALL $FILENAME
|
||||||
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
checksum() {
|
checksum() {
|
||||||
echo "[*] Generating dist tarball checksum"
|
echo "[*] Generating dist tarball checksum"
|
||||||
|
pushd $TMP_DIR
|
||||||
sha256sum $TARBALL > $TARBALL.sha256
|
sha256sum $TARBALL > $TARBALL.sha256
|
||||||
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
sign() {
|
sign() {
|
||||||
echo "[*] Signing dist tarball checksum"
|
echo "[*] Signing dist tarball checksum"
|
||||||
gpg --output $TARBALL.asc --sign --detach --armor $TARBALL
|
pushd $TMP_DIR
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
gpg --verbose \
|
||||||
|
--pinentry-mode loopback \
|
||||||
|
--batch --yes \
|
||||||
|
--passphrase $GPG_PASSWORD \
|
||||||
|
--local-user $KEY \
|
||||||
|
--output $TARBALL.asc \
|
||||||
|
--sign --detach \
|
||||||
|
--armor $TARBALL
|
||||||
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_dir() {
|
delete_dir() {
|
||||||
|
@ -82,26 +98,25 @@ delete_dir() {
|
||||||
upload_dist() {
|
upload_dist() {
|
||||||
delete_dir $1
|
delete_dir $1
|
||||||
|
|
||||||
|
pushd $TMP_DIR
|
||||||
for file in $TARBALL $TARBALL.asc $TARBALL.sha256
|
for file in $TARBALL $TARBALL.asc $TARBALL.sha256
|
||||||
do
|
do
|
||||||
curl -v \
|
curl -v \
|
||||||
-F upload=@$file \
|
-F upload=@$file \
|
||||||
"$DUMBSERVE_HOST/api/v1/files/upload?path=$1/"
|
"$DUMBSERVE_HOST/api/v1/files/upload?path=$1/"
|
||||||
done
|
done
|
||||||
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
publish() {
|
publish() {
|
||||||
mkdir $TARGET_DIR
|
|
||||||
copy
|
copy
|
||||||
pushd $TMP_DIR
|
|
||||||
pack
|
pack
|
||||||
checksum
|
checksum
|
||||||
sign
|
sign
|
||||||
publish
|
upload_dist $2
|
||||||
popd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$1 $@
|
$1 $@
|
||||||
|
|
Loading…
Reference in a new issue