Skip to content

Commit

Permalink
Merge branch 'release/1.1.0' into feature/issue-1558
Browse files Browse the repository at this point in the history
  • Loading branch information
sashapanasiuk5 authored Sep 29, 2024
2 parents fe6c3d8 + 9ef8037 commit 8818830
Show file tree
Hide file tree
Showing 90 changed files with 1,778 additions and 568 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ REACT_APP_BACKEND_URL=https://localhost:5001/api
REACT_APP_TEMPVAL=tempval
API_URL=https://best.api.ever.com
REACT_APP_GOOGLE_ANALYTICS=tempval
RECAPTCHA_SITE_KEY="6LeUO3ApAAAAAOC7F4v0qTsSwIR9mZu33SWjAAtM"
RECAPTCHA_SITE_KEY="6LeUO3ApAAAAAOC7F4v0qTsSwIR9mZu33SWjAAtM"
VERSION=1.1.0
35 changes: 35 additions & 0 deletions GITVERSION_PROPERTIES
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"Major": 1,
"Minor": 1,
"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"
}
12 changes: 7 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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"

}
}
Expand Down
7 changes: 7 additions & 0 deletions __mocks__/@stores/root-store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ export const useModalContext = () => ({
},
});

export const useAudioContext = () => ({
audio: {
base64: 'base64Mock',
mimeType: 'audio/mpeg',
},
});

export const useMobx = () => ({
newsStore: {
updateNews: mockUpdateNews,
Expand Down
98 changes: 51 additions & 47 deletions config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,53 +38,57 @@ module.exports = {
new Dotenv({
path: `./.env`,
}),
// new GenerateSW({
// skipWaiting: true,
// clientsClaim: true,
// maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
// runtimeCaching: [
// {
// urlPattern: /\.(?:js|css)$/,
// handler: 'CacheFirst',
// options: {
// cacheName: 'static-resources',
// expiration: {
// maxAgeSeconds: 60 * 60 * 24 * 7, // 1 week
// },
// },
// },
// {
// urlPattern: /\.(?:png|jpg|jpeg|svg|gif)$/,
// handler: 'CacheFirst',
// options: {
// cacheName: 'image-resources',
// expiration: {
// maxAgeSeconds: 60 * 60 * 24 * 7, // 1 week
// },
// },
// },
// {
// urlPattern: /\.(?:woff|woff2|ttf|otf)$/,
// handler:'CacheFirst',
// options: {
// cacheName: 'font-resources',
// expiration: {
// maxAgeSeconds: 60 * 60 * 24 * 90, // 3 months
// },
// },
// },
// {
// urlPattern: /^https?.*/,
// handler: 'NetworkFirst',
// options: {
// cacheName: 'external-resources',
// expiration: {
// maxEntries: 260
// },
// },
// },
// ],
// }),
new GenerateSW({
skipWaiting: true,
clientsClaim: true,
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
runtimeCaching: [
{
urlPattern: /env-config\.js$/,
handler: 'NetworkOnly'
},
{
urlPattern: /\.(?:js|css)$/,
handler: 'CacheFirst',
options: {
cacheName: 'static-resources',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7, // 1 week
},
},
},
{
urlPattern: /\.(?:png|jpg|jpeg|svg|gif)$/,
handler: 'CacheFirst',
options: {
cacheName: 'image-resources',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7, // 1 week
},
},
},
{
urlPattern: /\.(?:woff|woff2|ttf|otf)$/,
handler:'CacheFirst',
options: {
cacheName: 'font-resources',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 90, // 3 months
},
},
},
{
urlPattern: /^https?.*/,
handler: 'NetworkFirst',
options: {
cacheName: 'external-resources',
expiration: {
maxEntries: 260
},
},
},
],
}),
],
optimization: {
splitChunks: {
Expand Down
10 changes: 7 additions & 3 deletions config/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ module.exports = {
clientsClaim: true,
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
runtimeCaching: [
{
urlPattern: /env-config\.js$/,
handler: 'NetworkOnly'
},
{
urlPattern: /\.(?:js|css)$/,
handler: 'CacheFirst',
handler: 'NetworkFirst',
options: {
cacheName: 'static-resources',
expiration: {
Expand All @@ -65,7 +69,7 @@ module.exports = {
},
{
urlPattern: /\.(?:png|jpg|jpeg|svg|gif)$/,
handler: 'CacheFirst',
handler: 'StaleWhileRevalidate',
options: {
cacheName: 'image-resources',
expiration: {
Expand All @@ -75,7 +79,7 @@ module.exports = {
},
{
urlPattern: /\.(?:woff|woff2|ttf|otf)$/,
handler:'CacheFirst',
handler:'StaleWhileRevalidate',
options: {
cacheName: 'font-resources',
expiration: {
Expand Down
3 changes: 3 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ server {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
location ~ ^/(index.html|main.bundle.js){
add_header Cache-Control "private, no-store, no-cache";
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "streetcode",
"author": "SoftServe IT Academy (https://career.softserveinc.com/uk-ua/)",
"license": "MIT",
"version": "0.1.0",
"version": "1.1.0",
"private": true,
"dependencies": {
"@ant-design/icons": "^4.8.0",
Expand Down
1 change: 1 addition & 0 deletions public/env-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ window._env_ = {
API_URL: "https://stageback.streetcode.com.ua/api",
REACT_APP_GOOGLE_ANALYTICS: "REACT_APP_GOOGLE_ANALYTICS_VALUE",
RECAPTCHA_SITE_KEY: "6LeUO3ApAAAAAOC7F4v0qTsSwIR9mZu33SWjAAtM",
VERSION: "1.1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ const ArtGallery = ({
if (streetcodeIdValidAndFetchingRequired()) {
secondRender.current = true;
if (isFillArtsStore) {
await fetchAllToDefaultTemplate(getStreetCodeId !== -1 ? getStreetCodeId : parseId);
let currStreetcodeId = getStreetCodeId !== -1 ? getStreetCodeId : parseId;
const startingSlide = await fetchAllToDefaultTemplate(currStreetcodeId);

let currentSlide = 0;
let currentSlide = startingSlide ?? 0;
while (currentSlide < MAX_SLIDES_AMOUNT) {
try {
// eslint-disable-next-line no-await-in-loop
await fetchAllArtSlidesByStreetcodeId(getStreetCodeId !== -1 ? getStreetCodeId : parseId, currentSlide);
await fetchAllArtSlidesByStreetcodeId(currStreetcodeId, currentSlide);

currentSlide += amountOfSlides;
} catch (error: unknown) {
Expand Down Expand Up @@ -340,4 +341,4 @@ const ArtGallery = ({
);
};

export default observer(ArtGallery);
export default observer(ArtGallery);
Loading

0 comments on commit 8818830

Please sign in to comment.