Advertisement
Guest User

Untitled

a guest
Jul 16th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. require "Spaceship"
  2.  
  3. file = 'RemoteBuildNumber'
  4.  
  5. user = ARGV[0]
  6. pass = ARGV[1]
  7. appid = ARGV[2]
  8. version = ARGV[3]
  9.  
  10. File.delete(file) if File.exist?(file)
  11.  
  12. Spaceship::Tunes.login(user, pass)
  13.  
  14. app = Spaceship::Tunes::Application.find(appid)
  15.  
  16. train = app.build_trains[version]
  17. build = train.first # Array first is the last new build
  18.  
  19. File.write(file, build.build_version)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement