Skip to content

Latest commit

 

History

History
164 lines (132 loc) · 6.05 KB

DEVELOPMENT.md

File metadata and controls

164 lines (132 loc) · 6.05 KB

Development

fix.sh

If you want to use rbenv/pyenv/etc to manage versions of tools, there's a fix.sh script which may be what you'd like to install dependencies.

Overcommit

This project uses overcommit for quality checks. bundle exec overcommit --install will install it.

direnv

This project uses direnv to manage environment variables used during development. See the .envrc file for detail.

Run Chrome extension from local checkout

  1. Run 'make' to create the bundle with webpack, or 'make start' to start webpack in watch mode.
  2. Go to chrome://extensions/
  3. Make sure 'Developer mode' is flipped on in the upper right.
  4. Click the 'Load unpacked' button.
  5. Choose the dist/chrome-extension directory

Run Alfred workflow from local checkout

  1. make
  2. yarn install (only needed once)
  3. You should now see the workflow show up in Alfred's configuration.

Interactive development with Asana API

  1. Save off the configured Asana client object in asana-base.ts#fetchClient():
    const w: any = window;
    w.savedClient = fetchedClient;
2. Open up Extensions | Upvoter for Asana
3. Click reload icon
4. Invoke filer on something
5. Save off the client in the Chrome DevTools console before the background session expires:
 ```TypeScript
 client = savedClient;
  1. You can now invoke the methods from node-asana:
    stories = await client.stories.getStoriesForTask('1234);

Releasing Alfred package

Related backlog tasks:

  • Do npm Alfred release of cookiecutter-multicli projects in CircleCI (after other tests pass)

First, run these commands:

git stash && git checkout main && git pull && make
last_released_version=$(npm version --json | jq -r '."alfred-upvoter-for-asana"')
git log v${last_released_version:?}..
update_type= # patch/minor/major
npm version ${update_type:?}
git push
git push --tags
npm publish
alfy-cleanup

Now, remove your current installation from Alfred on your machine.

Then, install the newly published version via npm:

npm install --location=global alfred-upvoter-for-asana --upgrade

Verify the version installed matches what you just published:

npm list --location=global | grep alfred-upvoter-for-asana

Then, load Alfred | Preferences | Workflows | Upvoter for Asana | right click | Export ... | (type in version from CLI output) | Export | choose this directory | Export

Once done, make a GitHub release with the exported file (do this in a new tab):

cd ../upvoter-for-asana
new_release=$(npm version --json | jq -r '."alfred-upvoter-for-asana"')
gh release create --generate-notes v${new_release:?} 'Upvoter for Asana.alfredworkflow'

Delete your current installation in Alfred again.

open 'Upvoter for Asana.alfredworkflow' | configure as prompted | Import

packal | Login if needed | Dashboard | Upvoter for Asana | Edit current | Workflow File | Remove | Choose File | (.alfredworkflow file) | Upload | Version | (update) | (scroll to bottom) | Submit

Initial release to packal.org

  1. Go through at least the screenshot generation steps of 'Initial release to Chrome Web Store'
  2. Note down what the existing screenshots are, including the existing left and right sides of split screen images: open docs/screenshot-*.png
  3. Plan out what additional screenshots you'd like to have in the gallery and what will be reused.
  4. Generate 1280x800 (or scaled up) screenshots and save as docs/screenshot-n-raw.png and so on
  5. Stage the screenshot raw files in git.
  6. Add any annotations and save docs/screenshot-n.paint and so on. Open a similar .paint from a sibling project to copy and paste the annotation text to keep to the same style.
  7. Stage the screenshot paint files in git.
  8. File | Save As... | png | docs/screenshot-n.png (and so on) | Save
  9. Image | Adjust Size... | Scale proportionally ☑ | Resample image ☑ | Get to 1280x800 (or just under if ratio isn't right) | OK
  10. Use adjust size to add transparent border until exactly as 1200x800 (don't 'Scale proportionally' or 'Resample image' this time) | OK
  11. Stage screenshot-n.png (and so on) in git.
  12. Ensure docs/screenshot-n.png is scaled to 1280x800 with file command
  13. Go to the form
  14. Workflow Name: Upvoter for Asana
  15. Version: (take latest version from package.json)
  16. Bundle ID: cc.broz.asana.upvoter-for-asana
  17. Short description: (take short description from README, drop mention of Alfred or Chrome Extension)
  18. Icon: (upload static/chrome-extension/apiology-128x128.png) | Upload
  19. Workflow file (upload latest release from GitHub) | Upload
  20. Worfklow Description: select Text format | markdown | Copy the one sentence blurb entered above, then the usage instructions (you may need to merge the Chrome and Alfred instructions)
  21. Alfred Forum Link | (leave empty for now)
  22. Github URL: https://github.com/apiology/upvoter-for-asana
  23. Categories: (fill in)
  24. Tags: (fill in - e.g., asana)
  25. Applications: (fill in - probably blank)
  26. Webservices: (fill in - e.g. Asana)
  27. Packal Documentation Page: Leave blank
  28. Submit

Releasing to Chrome Web Store

  1. Update screenshots in docs/ for any new features
  2. Update README.md with new screenshots
  3. PR screenshot updates in
  4. git stash && git checkout main && git pull
  5. Bump the version in static/chrome-extension/manifest.json locally.
  6. git commit -m "Bump version" static/chrome-extension/manifest.json
  7. git push && make clean && make
  8. Update package.zip in developer dashboard as apiology-cws user.
  9. Upload any new screenshots
  10. Update description to match current README.md - manually translate from markdown to text.
  11. Save draft
  12. ... | Preview
  13. Publish