generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.0.2' into feature/issue-1529
- Loading branch information
Showing
21 changed files
with
315 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 0, | ||
"PreReleaseTag": "beta.1", | ||
"PreReleaseTagWithDash": "-beta.1", | ||
"PreReleaseLabel": "beta", | ||
"PreReleaseLabelWithDash": "-beta", | ||
"PreReleaseNumber": 1, | ||
"WeightedPreReleaseNumber": 30001, | ||
"BuildMetaData": 47, | ||
"BuildMetaDataPadded": "0047", | ||
"FullBuildMetaData": "47.Branch.release-1.0.0.Sha.283d01e8424001490c227db838d965580c59935e", | ||
"MajorMinorPatch": "1.0.0", | ||
"SemVer": "1.0.0-beta.1", | ||
"LegacySemVer": "1.0.0-beta1", | ||
"LegacySemVerPadded": "1.0.0-beta0001", | ||
"AssemblySemVer": "1.0.0.0", | ||
"AssemblySemFileVer": "1.0.0.0", | ||
"FullSemVer": "1.0.0-beta.1+47", | ||
"InformationalVersion": "1.0.0-beta.1+47.Branch.release-1.0.0.Sha.283d01e8424001490c227db838d965580c59935e", | ||
"BranchName": "release/1.0.0", | ||
"EscapedBranchName": "release-1-0-0", | ||
"Sha": "283d01e8424001490c227db838d965580c59935e", | ||
"ShortSha": "283d01e", | ||
"NuGetVersionV2": "1.0.0-beta0001", | ||
"NuGetVersion": "1.0.0-beta0001", | ||
"NuGetPreReleaseTagV2": "beta0001", | ||
"NuGetPreReleaseTag": "beta0001", | ||
"VersionSourceSha": "bd3aa573f4e0308049bbef8c6639abd2851495a0", | ||
"CommitsSinceVersionSource": 47, | ||
"CommitsSinceVersionSourcePadded": "0047", | ||
"UncommittedChanges": 1, | ||
"CommitDate": "2024-09-12" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ pipeline { | |
sh "cat version" | ||
vers = readFile(file: 'version').trim() | ||
sh "echo ${vers}" | ||
env.vers="${vers}" | ||
env.CODE_VERSION = readFile(file: 'version').trim() | ||
echo "${env.CODE_VERSION}" | ||
SEM_VERSION="${env.CODE_VERSION}" | ||
|
@@ -234,14 +235,15 @@ pipeline { | |
} | ||
steps { | ||
script { | ||
|
||
git branch: 'master', credentialsId: 'test_git_user', url: '[email protected]:ita-social-projects/StreetCode_Client.git' | ||
sh 'echo ${BRANCH_NAME}' | ||
sh "git checkout master" | ||
sh 'echo ${BRANCH_NAME}' | ||
sh "git merge release/${env.SEM_VERSION}" | ||
sh "npm version ${env.SEM_VERSION} -m 'Upgrade to %s as part of release'" | ||
|
||
sh "git push origin main" | ||
sh 'git merge ${BRANCH_NAME}' | ||
sh "npm version ${env.vers} --allow-same-version --no-git-tag-version" | ||
sh "git add ." | ||
sh "git commit -m 'Upgrade to %s as part of release'" | ||
sh "git push origin master" | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-disable no-restricted-syntax */ | ||
/* eslint-disable no-underscore-dangle */ | ||
import { useEffect, useState } from 'react'; | ||
|
||
const WithClearCache: React.FC<{ children: React.ReactNode }> = ({ children }) => { | ||
const [isLatestBuildDate, setIsLatestBuildDate] = useState<boolean>(true); | ||
|
||
const refreshCacheAndReload = () => { | ||
if (caches) { | ||
caches.keys().then((names) => { | ||
for (const name of names) { | ||
caches.delete(name); | ||
} | ||
console.log('Cache is cleared'); | ||
window.location.reload(); | ||
}); | ||
} | ||
}; | ||
|
||
useEffect(() => { | ||
const localVersion = localStorage.getItem('VERSION'); | ||
const envVersion = window._env_.VERSION; | ||
if (typeof envVersion !== 'undefined') { | ||
const isVersionMatches = localVersion === envVersion; | ||
setIsLatestBuildDate(isVersionMatches); | ||
if (!isVersionMatches) { | ||
localStorage.setItem('VERSION', envVersion); | ||
refreshCacheAndReload(); | ||
} | ||
} | ||
}, [isLatestBuildDate]); | ||
|
||
if (isLatestBuildDate) { | ||
return children; | ||
} | ||
return null; | ||
}; | ||
|
||
export default WithClearCache; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.