diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f017779758..62c8c25aa0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,8 +19,8 @@ jobs: if [ -z "${CIRCLE_TAG}" ]; then echo "Nothing to do. Not a release." else - MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([^-]*)-.*/\1/') - MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/[^-]*-(.*)/\1/') + MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\1/') + MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\2/') sed -i "s/SERIALNO=.*/SERIALNO=${MAJOR_VER}/g" release/src-rt/version.conf sed -i "s/EXTENDNO=.*/EXTENDNO=${MINOR_VER}/g" release/src-rt/version.conf fi @@ -81,7 +81,7 @@ jobs: name: Remove image without firmware command: | cd ${PROJECT_DIR}/release/${RELEASE_DIR}/image/ - rm $(ls DSL-* | grep -v ".*DSL.*DSL.*") + rm $(ls DSL-* | grep -v ".*DSL.*DSL.*") -f ls - run: name: Prepare workspace @@ -117,16 +117,16 @@ jobs: git config --global push.default simple git clone -b master --single-branch git@github.com:gnuton/asuswrt-merlin.ng.git cd asuswrt-merlin.ng - echo "Creating manifest file..." UPDATE_DIR=updates - MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([^-]*)-.*/\1/') - MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/[^-]*-(.*)/\1/') + MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\1/') + MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\2/') RELEASE_NOTE_FILE=$(echo "${MAJOR_VER}_${MINOR_VER}_note.txt" | sed "s/\./_/") + echo "Generating manifest file..." echo "DSL-AC68U#FW${MAJOR_VER}#EXT${MINOR_VER}#BETAFW0#BETAEXT0#" > ${UPDATE_DIR}/manifest.txt cp $HOME/project/workspace/release/CHANGELOG ${UPDATE_DIR}/"${RELEASE_NOTE_FILE}" echo "Uploading to github manifest and ${RELEASE_NOTE_FILE}" git add ${UPDATE_DIR} - git commit -m "Updating Notes and manifest to ${MAJOR_VER} ${MINOR_VER} [ci skip]" -a + git commit -m "Updating Notes and manifest to version:${MAJOR_VER} ${MINOR_VER} [ci skip]" -a git push origin publish-github-release: docker: