Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove version #1410

Merged
merged 13 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions docs/RELEASES.md

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

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

8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "fractal-interface",
"version": "0.1.8",
"private": true,
"dependencies": {
"@apollo/client": "^3.7.10",
Expand Down Expand Up @@ -53,13 +52,8 @@
"scripts": {
"lint": "next lint",
"lint:fix": "next lint --fix",
"set:env": "GENERATE_SOURCEMAP=false NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD`",
Copy link
Member Author

@adamgall adamgall Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this script and inlined the important part (NEXT_PUBLIC_GIT_HASH=git rev-parse HEAD) into the dev script. Removed GENERATE_SOURCEMAP=false because that was a CRA thing, not really relevant in our current project.

"dev": "npm run set:env & next dev",
"start": "npm run set:env & next start",
"start:https": "npm run set:env & HTTPS=true next start",
Comment on lines -58 to -59
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed these, and these two scripts are what I'm most unsure about. When/who is ever running these start scripts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do technically use start locally as I do like to test on the build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heard! I will replace these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start also used by Netlify to run production server

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mudrila are you sure about that? I see that netlify builds the site with npm run build

Screenshot 2024-03-06 at 1 16 54 PM

but I don't see anywhere in the settings where the start script is executed...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mudrila as a test, I just removed the start and start:https scripts from package.json again, and the deploy preview for this PR builds and deploys just fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, adding the start script back even tho it's just next start

"start:windows": "set \"GENERATE_SOURCEMAP=false\" && for /F \"delims=\" %I in ('git rev-parse HEAD') do set \"NEXT_PUBLIC_GIT_HASH=%I\" && next start",
Copy link
Member Author

@adamgall adamgall Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this, none of us are on Windows.

Edit: this comment only applies to line 60.

"dev": "npm run graphql:build && NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD` next dev",
"build": "npm run graphql:build && NEXT_PUBLIC_GIT_HASH=`git rev-parse HEAD` next build",
"build:windows": "for /F \"delims=\" %I in ('git rev-parse HEAD') do set \"NEXT_PUBLIC_GIT_HASH=%I\" && next build",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this, none of us are on Windows

"graphql:build": "graphclient build",
"graphql:dev-server": "graphclient serve-dev",
"test": "vitest --dir=test",
Expand Down
39 changes: 21 additions & 18 deletions src/components/pages/AppHome/AppFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Box, BoxProps, Divider, Flex, Link, Spacer, Text } from '@chakra-ui/react';
import { Trans, useTranslation } from 'react-i18next';
import packageJson from '../../../../package.json';
import { URL_DECENT } from '../../../constants/url';
import ExternalLink from '../../ui/links/ExternalLink';

Expand Down Expand Up @@ -42,23 +41,27 @@ export function AppFooter({ ...rest }: BoxProps) {
>
{t('audit')}
</ExternalLink>
<Text
color="grayscale.100"
textStyle="text-sm-mono-bold"
paddingStart="1rem"
paddingEnd="1rem"
>
|
</Text>
<ExternalLink
href={
'https://github.com/decent-dao/fractal-interface/commit/' +
process.env.NEXT_PUBLIC_GIT_HASH
}
textStyle="text-sm-mono-bold"
>
v{packageJson.version}
</ExternalLink>
{process.env.NEXT_PUBLIC_GIT_HASH !== undefined && (
<>
<Text
color="grayscale.100"
textStyle="text-sm-mono-bold"
paddingStart="1rem"
paddingEnd="1rem"
>
|
</Text>
<ExternalLink
href={
'https://github.com/decent-dao/fractal-interface/commit/' +
process.env.NEXT_PUBLIC_GIT_HASH
}
textStyle="text-sm-mono-bold"
>
{process.env.NEXT_PUBLIC_GIT_HASH.substring(0, 7)}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only real change here is that I'm showing a the git shorthash as the version identifier.

</ExternalLink>
</>
)}
</Flex>
</Box>
);
Expand Down