updated the deploy function and some minimal styling stuff
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
!#bin/bash
|
||||
#!/bin/bash
|
||||
BUILD_DIR="/root"
|
||||
# move sludge.db sqlite file
|
||||
mv $BUILD_DIR/build/sludge.db $BUILD_DIR/sludge.db
|
||||
|
||||
# find newest zip file and extract version
|
||||
NEWEST_ZIP="$(find "$BUILD_DIR" -maxdepth 1 -name "*.zip" -type f -printf '%T@ %p\n' | sort -rn | head -n 1 | cut -d' ' -f2)"
|
||||
VERSION="$(basename -s .zip "$NEWEST_ZIP" | cut -d' ' -f2)"
|
||||
|
||||
# move sludge.db sqlite file with versioned backup name
|
||||
cp "$BUILD_DIR/build/sludge.db" "$BUILD_DIR/sludge.db.$VERSION"
|
||||
|
||||
# remove build folder
|
||||
rm -rf $BUILD_DIR/build/
|
||||
rm -rf "$BUILD_DIR/build/"
|
||||
|
||||
# remove old build zip
|
||||
rm -- "$(ls -rt $BUILD_DIR/*.zip | head -n 1)"
|
||||
|
||||
# unzip new build zip
|
||||
unzip *.zip
|
||||
# unzip newest zip file
|
||||
unzip "$NEWEST_ZIP"
|
||||
|
||||
# move db file back
|
||||
mv $BUILD_DIR/sludge.db $BUILD_DIR/build/sludge.db
|
||||
cp "$BUILD_DIR/sludge.db.$VERSION" "$BUILD_DIR/build/sludge.db"
|
||||
|
||||
# restart sludge webserver
|
||||
sudo systemctl restart sludge-info
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
margin-right: auto;
|
||||
}
|
||||
&:hover {
|
||||
color: var(--primary-8);
|
||||
color: var(--primary-3);
|
||||
}
|
||||
}
|
||||
button {
|
||||
|
||||
@@ -56,12 +56,12 @@
|
||||
<style lang="scss">
|
||||
button {
|
||||
background: var(--primary-5);
|
||||
border-radius: 0.25rem;
|
||||
font-size: 2rem;
|
||||
border-radius: var(--br);
|
||||
font-size: 1.5rem;
|
||||
border: none;
|
||||
box-shadow: var(--bs);
|
||||
&:hover {
|
||||
background: var(--primary-7);
|
||||
background: var(--primary-4);
|
||||
}
|
||||
}
|
||||
section {
|
||||
@@ -86,12 +86,19 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
width: fit-content;
|
||||
}
|
||||
button {
|
||||
// margin: auto 0;
|
||||
flex-basis: 4rem;
|
||||
height: 4rem;
|
||||
font-size: 4rem;
|
||||
line-height: 1rem;
|
||||
border-radius: 5rem;
|
||||
font-family: monospace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user