8000 angular.js/version.js at location-fix · salzig/angular.js · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"css","path":"css","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"example","path":"example","contentType":"directory"},{"name":"i18n","path":"i18n","contentType":"directory"},{"name":"images","path":"images","contentType":"directory"},{"name":"lib","path":"lib","contentType":"directory"},{"name":"logs","path":"logs","contentType":"directory"},{"name":"src","path":"src","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"CHANGELOG.md","path":"CHANGELOG.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Gruntfile.js","path":"Gruntfile.js","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"angularFiles.js","path":"angularFiles.js","contentType":"file"},{"name":"changelog.js","path":"changelog.js","contentType":"file"},{"name":"changelog.spec.js","path":"changelog.spec.js","contentType":"file"},{"name":"changelog.tmp.md","path":"changelog.tmp.md","contentType":"file"},{"name":"check-size.sh","path":"check-size.sh","contentType":"file"},{"name":"gdocs.js","path":"gdocs.js","contentType":"file"},{"name":"gen_docs.sh","path":"gen_docs.sh","contentType":"file"},{"name":"init-repo.sh","path":"init-repo.sh","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"release-commit.sh","path":"release-commit.sh","contentType":"file"},{"name":"start-iteration.sh","path":"start-iteration.sh","contentType":"file"},{"name":"testacular-e2e.conf.js","path":"testacular-e2e.conf.js","contentType":"file"},{"name":"testacular-jqlite.conf.js","path":"testacular-jqlite.conf.js","contentType":"file"},{"name":"testacular-jquery.conf.js","path":"testacular-jquery.conf.js","contentType":"file"},{"name":"testacular-modules.conf.js","path":"testacular-modules.conf.js","contentType":"file"},{"name":"validate-commit-msg.js","path":"validate-commit-msg.js","contentType":"file"},{"name":"validate-commit-msg.spec.js","path":"validate-commit-msg.spec.js","contentType":"file"},{"name":"version.js","path":"version.js","contentType":"file"},{"name":"version.yaml","path":"version.yaml","contentType":"file"},{"name":"watchr-docs.rb","path":"watchr-docs.rb","contentType":"file"}],"totalCount":36}},"fileTreeProcessingTime":7.415619,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":14690389,"defaultBranch":"master","name":"angular.js","ownerLogin":"salzig","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2013-11-25T16:06:03.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/99911?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"location-fix","listCacheKey":"v0:1385397458.0","canEdit":false,"refType":"branch","currentOid":"25bcc87501ac5208db2220a803131fe6245946ee"},"path":"version.js","currentUser":null,"blob":{"rawLines":["#!/usr/bin/env node","","var FILE = 'version.yaml';","var fs = require('fs');","var optimist = require('optimist');","","optimist"," .usage('Manage ' + FILE + '.\\nUsage: $0 [options]')"," .describe('remove-snapshot', 'Remove -snapshot suffix.')"," .describe('minor-bump', 'Bump minor version one step.')"," .describe('minor-next', 'Return next minor version.')"," .describe('current', 'Return current verion')"," .describe('help', 'Show usage');","","","var bumpMinor = function(version) {"," var parts = version.split('.');"," var last = parts.pop();",""," var rc = last.match(/(\\d*)rc(\\d*)/);"," if (rc) {"," parts.push(rc[1] + 'rc' + (parseInt(rc[2], 10) + 1));"," } else {"," parts.push('' + (parseInt(last, 10) + 1));"," }",""," return parts.join('.');","};","","fs.readFile(FILE, 'utf8', function(err, content) {"," var version = content.match(/version\\:\\s([^\\-\\n]*)/)[1];",""," var args = optimist.argv;"," if (args['remove-snapshot']) {"," fs.writeFile(FILE, content.replace('-snapshot', ''), function(err) {"," if (!err) {"," console.log('Version updated (removed -snapshot).');"," process.exit(0);"," } else {"," console.error('Version update failed.');"," process.exit(1);"," }"," });"," } else if (args['minor-next']) {"," process.stdout.write(bumpMinor(version) + '\\n');"," process.exit(0);"," } else if (args['current']) {"," process.stdout.write(version + '\\n');"," process.exit(0);"," } else if (args['minor-bump']) {"," var bumped = bumpMinor(version);",""," if (!content.match(/\\-snapshot/)) bumped += '-snapshot';"," fs.writeFile(FILE, content.replace(version, bumped), function(err) {"," if (!err) {"," console.log('Version updated (bumped to ' + bumped + ').');"," process.exit(0);"," } else {"," console.error('Version update failed.');"," process.exit(1);"," }"," });"," } else {"," console.log(optimist.help());"," process.exit(args['help'] ? 0 : 1);"," }","});"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/salzig/angular.js/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"version.js","displayUrl":"https://github.com/salzig/angular.js/blob/location-fix/version.js?raw=true","headerInfo":{"blobSize":"1.86 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"f985327","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fsalzig%2Fangular.js%2Fblob%2Flocation-fix%2Fversion.js","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"67","truncatedSloc":"58"},"mode":"executable file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"JavaScript","languageID":183,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/salzig/angular.js/blob/location-fix/version.js","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/salzig/angular.js/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/salzig/angular.js/raw/refs/heads/location-fix/version.js","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":null},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/salzig/angular.js/branches":{"post":"haAWWJOXIpOck6Im9lDIjQgCxA0zVUIVnKxpzYJ8OOs1nY4PAMqketlBp4uvNpnAwK4BtOEISrNeUHj2qxcaLg"},"/repos/preferences":{"post":"Qc7eMCZf3RoNAUskUZec0pNMX8-ndlAiOzPUTQC8HvzQIqwJJOrX3RydFrRVZVwMMNEbAVQ7plpvo5_5J4cnvQ"}}},"title":"angular.js/version.js at location-fix · salzig/angular.js","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-263cab1760dd.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1b17b3e7786a.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true}}}
0