Update .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sthope 2023-08-28 18:43:19 +02:00
parent 7aaa123224
commit bc0351279a

View File

@ -3,7 +3,9 @@ name: release
steps: steps:
- name: create-script-file - name: create-script-file
image: alpine:3.13 image: node:14
environment:
TARGET_RELEASE_TAG: '2023-02-13-1223'
commands: commands:
- echo "const axios = require('axios');" > custom-script.js - echo "const axios = require('axios');" > custom-script.js
- echo "" >> custom-script.js - echo "" >> custom-script.js
@ -18,7 +20,7 @@ steps:
- echo "}" >> custom-script.js - echo "}" >> custom-script.js
- echo "" >> custom-script.js - echo "" >> custom-script.js
- echo "getLatestReleaseTag().then((latestReleaseTag) => {" >> custom-script.js - echo "getLatestReleaseTag().then((latestReleaseTag) => {" >> custom-script.js
- echo " const targetReleaseTag = '2023-02-13-1223';" >> custom-script.js - echo " const targetReleaseTag = process.env.TARGET_RELEASE_TAG;" >> custom-script.js
- echo "" >> custom-script.js - echo "" >> custom-script.js
- echo " if (latestReleaseTag > targetReleaseTag) {" >> custom-script.js - echo " if (latestReleaseTag > targetReleaseTag) {" >> custom-script.js
- echo " console.log('This pipeline is run because the new release is newer than the one I have.');" >> custom-script.js - echo " console.log('This pipeline is run because the new release is newer than the one I have.');" >> custom-script.js
@ -28,8 +30,3 @@ steps:
- echo " console.log('The new release is older than the one I have.');" >> custom-script.js - echo " console.log('The new release is older than the one I have.');" >> custom-script.js
- echo "}" >> custom-script.js - echo "}" >> custom-script.js
- echo "" >> custom-script.js - echo "" >> custom-script.js
- name: run
image: node:14
commands:
- node custom-script.js