Skip to content

Commit

Permalink
#latest: #141 download latest version from Maven Central only in one …
Browse files Browse the repository at this point in the history
…place
  • Loading branch information
yegor256 committed May 28, 2023
1 parent c7b9851 commit a1fa3c5
Show file tree
Hide file tree
Showing 40 changed files with 50 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .rultor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker:
image: yegor256/rultor-image:1.13.0
image: yegor256/rultor-image:1.19.0
assets:
npmrc: yegor256/objectionary-secrets#npmrc
install: |
Expand All @@ -12,7 +12,7 @@ install: |
release:
script: |
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
sed -i -e "s/\"version\": \"0.0.0\"/\"version\": \"${tag}\"/" package.json
sed -i -e "s/0.0.0/${tag}/" package.json
sed -i -e "s/0.0.0/${tag}/" src/version.js
sed -i -e "s/0000-00-00/$(date +%Y-%m-%d)/" src/version.js
grunt --no-color
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 Yegor Bugayenko
Copyright (c) 2022-2023 Objectionary.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![We recommend IntelliJ IDEA](https://www.elegantobjects.org/intellij-idea.svg)](https://www.jetbrains.com/idea/)

[![node-current](https://img.shields.io/node/v/eolang)](https://www.npmjs.com/package/eolang)
[![grunt](https://github.com/objectionary/eoc/actions/workflows/grunt.yml/badge.svg)](https://github.com/objectionary/eoc/actions/workflows/grunt.yml)
[![node-current](https://img.shields.io/node/v/eolang)](https://www.npmjs.com/package/eolang)
[![PDD status](http://www.0pdd.com/svg?name=objectionary/eoc)](http://www.0pdd.com/p?name=objectionary/eoc)
[![Hits-of-Code](https://hitsofcode.com/github/objectionary/eoc)](https://hitsofcode.com/view/github/objectionary/eoc)
![Lines of code](https://img.shields.io/tokei/lines/github/objectionary/eoc)
Expand Down
2 changes: 1 addition & 1 deletion itest/program.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# Copyright (c) 2022 Yegor Bugayenko
# Copyright (c) 2022-2023 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion itest/story-test.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# Copyright (c) 2022 Yegor Bugayenko
# Copyright (c) 2022-2023 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion itest/story.eo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)
#
# Copyright (c) 2022 Yegor Bugayenko
# Copyright (c) 2022-2023 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion mvnw/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Yegor Bugayenko
Copyright (c) 2022-2023 Objectionary.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions src/commands/assemble.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -34,9 +34,9 @@ module.exports = function(opts) {
return mvnw([
'eo:assemble',
'-Deo.version=' + opts.parser,
'-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
opts.verbose ? '' : '--quiet',
opts.trackOptimizationSteps ? '-Deo.trackOptimizationSteps' : '',
'-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
`-Deo.targetDir=${path.resolve(opts.target)}`,
`-Deo.outputDir=${path.resolve(opts.target, 'classes')}`,
`-Deo.placed=${path.resolve(opts.target, 'eo-placed.csv')}`,
Expand Down
4 changes: 1 addition & 3 deletions src/commands/audit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,14 +23,12 @@
*/

const mvnw = require('../mvnw');
const parserVersion = require('../parser-version');

/**
* Command to audit all packages.
* @param {Hash} opts - All options
* @return {Promise} of audit task
*/
module.exports = function(opts) {
parserVersion.get();
return mvnw(['--version'], null, opts.batch);
};
2 changes: 1 addition & 1 deletion src/commands/clean.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions src/commands/compile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const mvnw = require('../mvnw');
const path = require('path');
const parserVersion = require('../parser-version');

/**
* Command to compile target language into binaries.
Expand All @@ -40,7 +39,7 @@ module.exports = function(opts) {
`-Dmaven.compiler.target=1.8`,
`-Deo.targetDir=${target}`,
`-Deo.generatedDir=${path.resolve(opts.target, 'generated-sources')}`,
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
], opts.target, opts.batch).then((r) => {
console.info('Java .class files compiled into %s', target);
return r;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dataize.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/commands/foreign.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions src/commands/link.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const mvnw = require('../mvnw');
const path = require('path');
const parserVersion = require('../parser-version');

/**
* Command to link binaries into a single executable binary.
Expand All @@ -36,7 +35,7 @@ module.exports = function(opts) {
'jar:jar',
opts.verbose ? '' : '--quiet',
`-Deo.targetDir=${path.resolve(opts.target)}`,
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
], opts.target, opts.batch).then((r) => {
console.info('Executable JAR created at %s', path.resolve(opts.target, 'eoc.jar'));
return r;
Expand Down
7 changes: 3 additions & 4 deletions src/commands/parse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const path = require('path');
const mvnw = require('../mvnw');
const parserVersion = require('../parser-version');

/**
* Command to parse EO into .XMIR files.
Expand All @@ -34,9 +33,9 @@ const parserVersion = require('../parser-version');
module.exports = function(opts) {
return mvnw([
'eo:parse',
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
'-Deo.hash=' + (opts.hash ? opts.hash : opts.parser),
opts.verbose ? '' : '--quiet',
opts.hash ? '-Deo.hash=' + opts.hash : '',
`-Deo.targetDir=${path.resolve(opts.target)}`,
`-Deo.outputDir=${path.resolve(opts.target, 'classes')}`,
], opts.target, opts.batch).then((r) => {
Expand Down
5 changes: 2 additions & 3 deletions src/commands/register.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const mvnw = require('../mvnw');
const path = require('path');
const parserVersion = require('../parser-version');

/**
* Command to register .EO sources.
Expand All @@ -35,7 +34,7 @@ module.exports = function(opts) {
const foreign = path.resolve(opts.target, 'eo-foreign.json');
return mvnw([
'eo:register',
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
opts.verbose ? '' : '--quiet',
`-Deo.targetDir=${path.resolve(opts.target)}`,
`-Deo.sourcesDir=${path.resolve(opts.sources)}`,
Expand Down
5 changes: 2 additions & 3 deletions src/commands/sodg.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const path = require('path');
const mvnw = require('../mvnw');
const parserVersion = require('../parser-version');

/**
* Generate SODG files from XMIR.
Expand All @@ -34,7 +33,7 @@ const parserVersion = require('../parser-version');
module.exports = function(opts) {
const argv = [
'eo:sodg',
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
opts.verbose ? '' : '--quiet',
`-Deo.targetDir=${path.resolve(opts.target)}`,
];
Expand Down
2 changes: 1 addition & 1 deletion src/commands/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 2 additions & 3 deletions src/commands/transpile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -24,7 +24,6 @@

const mvnw = require('../mvnw');
const path = require('path');
const parserVersion = require('../parser-version');

/**
* Command to transpile XMIR files into target language.
Expand All @@ -35,7 +34,7 @@ module.exports = function(opts) {
const sources = path.resolve(opts.target, 'generated-sources');
return mvnw([
'eo:transpile',
'-Deo.version=' + (opts.parser ? opts.parser : parserVersion.get()),
'-Deo.version=' + opts.parser,
opts.verbose ? '' : '--quiet',
`-Deo.targetDir=${path.resolve(opts.target)}`,
`-Deo.generatedDir=${sources}`,
Expand Down
5 changes: 2 additions & 3 deletions src/eoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -41,7 +41,6 @@ const test = require('./commands/test');
if (process.argv.includes('--verbose')) {
tinted.enable('debug');
console.debug('Debug output is turned ON');
console.info('INFO');
}

if (process.argv.includes('--latest')) {
Expand All @@ -64,7 +63,7 @@ program
.option('-t, --target <path>', 'Directory with all generated files', '.eoc')
.option('--hash <hex>', 'Hash in objectionary/home to compile against', parser)
.option('--parser <version>', 'Set the version of EO parser to use', parser)
.option('--latest', 'Use latest parser and latest objectionary/home objects')
.option('--latest', 'Use the latest parser version from Maven Central')
.option('--alone', 'Just run a single command without dependencies')
.option('-b, --batch', 'Run in batch mode, suppress interactive messages')
.option('--no-color', 'Disable colorization of console messages')
Expand Down
2 changes: 1 addition & 1 deletion src/mvnw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/parser-version.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/tinted-console.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/commands/test_assemble.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion test/commands/test_audit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022 Yegor Bugayenko
* Copyright (c) 2022-2023 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit a1fa3c5

Please sign in to comment.