Tweaked frontend build and removed analytics

This commit is contained in:
nise.moe 2024-02-15 16:54:29 +01:00
parent ce4483e6c8
commit ce98565ae3
2 changed files with 4 additions and 33 deletions

View File

@ -2,21 +2,15 @@
# Set variables # Set variables
IMAGE_NAME="nise-frontend" IMAGE_NAME="nise-frontend"
IMAGE_REGISTRY="git.gengo.tech/gengotech" IMAGE_REGISTRY="git.gengo.tech/nuff"
IMAGE_VERSION=$(jq -r '.version' package.json) IMAGE_VERSION="latest"
# Check if there are uncommitted changes # Check if there are uncommitted changes
if [[ -n $(git status --porcelain) ]]; then if [[ -n $(git status --porcelain) ]]; then
git add . echo "Error: There are uncommitted changes. Please commit them before building."
git commit -m "Build and push v$IMAGE_VERSION" exit 1
fi fi
# List variables and prompt to continue
echo "Variables:"
echo "IMAGE_NAME=$IMAGE_NAME"
echo "IMAGE_REGISTRY=$IMAGE_REGISTRY"
echo "IMAGE_VERSION=$IMAGE_VERSION"
rm -rf target/ rm -rf target/
# Clean and build Angular project # Clean and build Angular project
@ -42,25 +36,4 @@ if [ "$?" != "0" ]; then
exit 1 exit 1
fi fi
docker tag $IMAGE_NAME:$IMAGE_VERSION $IMAGE_REGISTRY/$IMAGE_NAME:latest
docker push $IMAGE_REGISTRY/$IMAGE_NAME:latest
if [ "$?" != "0" ]; then
echo "Error: Failed to push $IMAGE_REGISTRY/$IMAGE_NAME:latest"
exit 1
fi
echo "Successfully built and pushed $IMAGE_REGISTRY/$IMAGE_NAME:$IMAGE_VERSION and $IMAGE_REGISTRY/$IMAGE_NAME:latest"
echo "Docker image pushed successfully to $IMAGE_REGISTRY/$IMAGE_NAME:$IMAGE_VERSION" echo "Docker image pushed successfully to $IMAGE_REGISTRY/$IMAGE_NAME:$IMAGE_VERSION"
# Add and commit changes to git
git add .
git commit -m "Build and push v$IMAGE_VERSION"
# Create annotated tag with commit message
git tag -a release-$IMAGE_VERSION -m "Release v$IMAGE_VERSION"
# Push changes and tags to remote repository
git push && git push --tags
echo "Successfully pushed changes and tags to remote repository"

View File

@ -12,8 +12,6 @@
<meta property="og:image" content="https://nise.moe/assets/keisatsu-chan.png"> <meta property="og:image" content="https://nise.moe/assets/keisatsu-chan.png">
<meta property="og:type" content="website"> <meta property="og:type" content="website">
<meta name="theme-color" content="#151515"> <meta name="theme-color" content="#151515">
<!-- Analytics -->
<script async src="https://neko.gengo.tech/script.js" data-website-id="0cdf016a-8163-439b-b28a-ca479ea88a14"></script>
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>