Comments (3)
Ah sorry! Slipped my mind that this was in actual
not actual-server
. Generating the file for the server on start is a great idea and would sort that out though!
actual
gets its version information directly from package.json
, but generating the same file on start and reading from it should do the trick? I'm going to have to think a bit about how builds work and how it would work bundled into actual-server
. Maybe if the file isn't there we know it's been imported not directly started and we can fallback to the version in package.json. It wouldn't work for edge builds of actual packaged into actual-server
though.
from actual.
I took a stab at this as one of my first potential changes to actual
.
I could either do it through express-actuator
(already used for /info
/health
and /metrics
) but it required a git.properties file be generated for every commit and I'm not sure how practical that is.
Alternatively I made a /info/git
endpoint that did
execSync('git rev-parse HEAD', { cwd: config.projectRoot }).toString().trim();
Are we okay with exec calls?
from actual.
For actual-server
: ideally I wouldn't want to have usage of exec
within the codebase. It can potentially lead to arbitrary code execution down the line (all it takes is for a junior to come in and add a variable in the shell command.. and 💣). What if we created a new file when running yarn start
that wrote a new file with active commit hash? And then just read from that file to get the hash. Same thing could be applied for yarn build
.
For actual
: the hash here would be different. No quick ideas how to solve it.
from actual.
Related Issues (20)
- [Feature] Rule action for basic calculation instead of only being able to set it HOT 1
- [Feature] Desktop App: Provide more feedback to the user about why server connecton could not be established HOT 1
- [Feature] Remove or allow to delete rules associated with completed schedules HOT 1
- [Bug]: @actual-app/api does not work when bundled HOT 3
- [Feature] Reconcile on Mobile HOT 1
- [Feature] Desktop app Discord presence HOT 1
- [Bug]: (API) - Income Categories Don't Retrive Budgets
- [Bug]: Random crash on Win11 HOT 20
- [Bug]: Imported payees regex matching not working HOT 8
- [Bug]: HOT 2
- [Bug]: Money moves tracking isn't undone on ctrl+z HOT 1
- [Bug]: An unknown error occurred while importing. Please report this as a new issue on Github. HOT 1
- [Bug]: Can't clear receiving end of an account transfer HOT 1
- [Bug]: Total failure of bank sync HOT 1
- [Feature] Update Sidebar UI HOT 8
- [Feature] Report that includes future months' budgeted income and expenditure HOT 1
- [Bug]: CSV duplicate matching no longer showing in the import window. HOT 1
- [Bug]: clearing a category name prevents it from being renamed on mobile
- [Bug]: Bank Pekao (supported on GoCardless) is missing in the bank selection dropdown HOT 2
- [Bug]: can't sync to server using cloudflare tunnel HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actual.