Skip to content

Ruby gem to upload private sourcemaps to Appsignal

Notifications You must be signed in to change notification settings

Drieam/appsignal-sourcemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appsignal Sourcemaps

This ruby gem uploads (private) sourcemaps to Appsignal using the Sourcemaps API.

Installation

To start using this gem, add it to the Gemfile of your application:

source 'https://rubygems.pkg.github.com/drieam' do
  gem 'appsignal-sourcemap'
end

After running bundle install you should enable the gem by adding upload_sourcemaps: true to your config/appsignal.yml file:

default:
  upload_sourcemaps: true

Also ensure that your Rails.application.config.asset_host is setup correctly since that is used to define the full URL of the assets. The gem then uploads the sourcemaps after the assets:precompile rake task. It searches for all .map files within the Rails.public_path directory.

Heroku

When building on heroku, make sure you set the revision based on the SOURCE_VERSION environment variable. This variable is set during the build phase and will be equal to the HEROKU_SLUG_COMMIT revision on runtime. Note that you should have heroku dyno metadata enabled.

default:
  revision: "<%= ENV['SOURCE_VERSION'] || ENV.fetch('HEROKU_SLUG_COMMIT', 'unknown') %>"

Publishing a new version

The publish workflow listens to a new release in GitHub.