Sirherobrine23 Dev #157

Merged
Sirherobrine23 merged 14 commits from Sirherobrine23_dev into main 2021-08-16 03:55:17 +00:00
26 changed files with 629 additions and 788 deletions
Showing only changes of commit a101d89a10 - Show all commits

6
.github/ChangeVersion.js vendored Normal file
View File

@ -0,0 +1,6 @@
const fs = require('fs');
const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8'));
const run_ID = process.env.RunID || "1111111111111111111111111111111111111";
Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`;
fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_JSon, null, 2));
console.log(Package_JSon.version);

View File

@ -20,16 +20,9 @@ jobs:
registry-url: https://registry.npmjs.org/
- name: Edit Version
uses: actions/github-script@v4
id: set-result
with:
script: |
const fs = require('fs');
const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8'));
const run_ID = "${{ github.run_id }}";
Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`;
fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2));
result-encoding: string
env:
RunID: ${{ github.run_id }}
run: node .github/ChangeVersion.js
- name: Install Packages
run: npm install

View File

@ -16,17 +16,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Edit Version
uses: actions/github-script@v4
with:
script: |
const fs = require('fs');
const Package_JSon = JSON.parse(fs.readFileSync(process.cwd()+'/package.json', 'utf8'));
const run_ID = "${{ github.run_id }}";
Package_JSon.version = `${run_ID.slice(0, 2)}.${run_ID.slice(3, 6)}.${run_ID.slice(7, 11)}`;
fs.writeFileSync(process.cwd()+'/package.json', JSON.stringify(Package_Json, null, 2));
console.log(Package_JSon.version);
return Package_JSon.version;
result-encoding: string
env:
RunID: ${{ github.run_id }}
run: node .github/ChangeVersion.js
- name: Install node depedencies
run: npm install -d --no-save