mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
fix
This commit is contained in:
10
Budfile
10
Budfile
@@ -81,9 +81,15 @@ check_versions() {
|
|||||||
|
|
||||||
docker_push() {
|
docker_push() {
|
||||||
local version=$(node -p "require('./package.json').version")
|
local version=$(node -p "require('./package.json').version")
|
||||||
|
# check if version already exist on dockerhub, if so, don't tag and push versioned image
|
||||||
|
if docker pull "dohsimpson/habittrove:v$version" &>/dev/null; then
|
||||||
|
echo "Docker image with tag v$version already exists on DockerHub. Skipping versioned image push"
|
||||||
docker tag habittrove dohsimpson/habittrove:latest
|
docker tag habittrove dohsimpson/habittrove:latest
|
||||||
docker tag habittrove "dohsimpson/habittrove:v$version"
|
|
||||||
docker push dohsimpson/habittrove:latest
|
docker push dohsimpson/habittrove:latest
|
||||||
|
echo "Pushed Docker images with tags: latest"
|
||||||
|
else
|
||||||
|
docker tag habittrove "dohsimpson/habittrove:v$version"
|
||||||
docker push "dohsimpson/habittrove:v$version"
|
docker push "dohsimpson/habittrove:v$version"
|
||||||
echo "Pushed Docker images with tags: latest and v$version"
|
echo "Pushed Docker images with tags: v$version"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ interface HabitStreakProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function HabitStreak({ habits }: HabitStreakProps) {
|
export default function HabitStreak({ habits }: HabitStreakProps) {
|
||||||
|
const { settings } = useSettings()
|
||||||
// Get the last 30 days of data
|
// Get the last 30 days of data
|
||||||
const dates = Array.from({ length: 30 }, (_, i) => {
|
const dates = Array.from({ length: 30 }, (_, i) => {
|
||||||
const { settings } = useSettings()
|
|
||||||
const d = getDateInTimezone(new Date(), settings.system.timezone)
|
const d = getDateInTimezone(new Date(), settings.system.timezone)
|
||||||
d.setDate(d.getDate() - i)
|
d.setDate(d.getDate() - i)
|
||||||
return d.toISOString().split('T')[0]
|
return d.toISOString().split('T')[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user