Updating the Code#
This page covers setting up a local development environment using GitHub and Clasp, how to update the code when new RideSheet versions are released, and how to contribute back to the main codebase.
Required Tools#
Before getting started, you'll need to install and configure these tools:
- Git - Version control system for tracking code changes
- GitHub Account - For hosting your code and collaborating with others
- Clasp - Google's Command Line Apps Script Projects tool for developing Apps Script locally
Setting Up Your Development Environment#
Follow these steps to set up a local development environment:
- Fork the RideSheet repository on GitHub to create your own copy
- Get your Apps Script project ID:
- Open your RideSheet spreadsheet
- Go to
Extensions > Apps Script
- Click Project Settings
- Copy the Script ID
- Clone your Apps Script project locally (this will create a new folder):
clasp clone <your-script-id>
- Initialize Git in the folder created by clasp:
cd <project-folder> git init
- Connect to your forked repository:
git remote add origin <your-fork-url> git fetch origin git reset --hard origin/main
- Push the main branch code to your RideSheet instance:
clasp push
Making Changes#
When making your own customizations on your forked repository:
- Create a new branch for your changes:
git checkout -b my-custom-feature
- Make changes to the code locally
- Push changes to Apps Script to test them:
clasp push
- Test your changes in the Apps Script editor and RideSheet spreadsheet
- Once satisfied, commit and push to GitHub:
git add . git commit -m "Description of changes" git push origin my-custom-feature
Note
If you're only planning to receive updates from the main RideSheet repository, you don't need to create feature branches.
Contributing Back#
RideSheet welcomes contributions from the community! We accept pull requests for:
- Bug fixes
- New features with broad applicability
- Improvements to existing functionality
Before starting work on a major feature, please:
- Open an issue to discuss the proposed changes
- Contact the RideSheet team for guidance
- Ensure your contribution would benefit multiple agencies
This helps ensure your time is well spent and the feature aligns with RideSheet's goals.