mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 16:52:56 -07:00
Added random versioning prefix to the translations so the users don't have to clear the cache
This commit is contained in:
parent
da096792af
commit
c14fd64f5f
2 changed files with 3 additions and 23 deletions
|
@ -58,10 +58,11 @@ const routes: Routes = [
|
|||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient, platformLocation: PlatformLocation) {
|
||||
const base = platformLocation.getBaseHrefFromDOM();
|
||||
const version = Math.floor(Math.random() * 999999999);
|
||||
if (base.length > 1) {
|
||||
return new TranslateHttpLoader(http, `${base}/translations/`, ".json");
|
||||
return new TranslateHttpLoader(http, `${base}/translations/`, `.json?v=${version}`);
|
||||
}
|
||||
return new TranslateHttpLoader(http, "/translations/", ".json");
|
||||
return new TranslateHttpLoader(http, "/translations/", `.json?v=${version}`);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
SERVICE="Ombi"
|
||||
# change directory to location of project.json
|
||||
pushd ./
|
||||
# run dotnet publish, specify release build
|
||||
dotnet publish -c Release
|
||||
# equivalent to cd .. (go back to previous directory)
|
||||
#popd
|
||||
# Create a docker image tagged with the name of the project:latest
|
||||
docker build -t "$SERVICE":latest .
|
||||
# Check to see if this container exists.
|
||||
CONTAINER=`docker ps --all | grep "$SERVICE"`
|
||||
# if it doesn't, then just run this.
|
||||
if [ -z "$CONTAINER" ]; then
|
||||
docker run -i -p 8000:5000 --name $SERVICE -t $SERVICE:latest
|
||||
# if it does exist; nuke it and then run the new one
|
||||
else
|
||||
docker rm $SERVICE
|
||||
docker run -i -p 8000:5000 --name $SERVICE -t $SERVICE:latest
|
||||
fi
|
||||
|
||||
read -p "Press enter to continue"
|
Loading…
Add table
Add a link
Reference in a new issue