Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5622b12 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

build: Remove exporting build number/date

parent 386504c1
Loading
Loading
Loading
Loading
+3 −20
Original line number Original line Diff line number Diff line
@@ -224,14 +224,6 @@ for branch in ${BRANCH_NAME//,/ }; do
      fi
      fi
    fi
    fi


    # Remove build number and date on builds.
    if [ -f out/build_date.txt ]; then
      rm out/build_date.txt
    fi
    if [ -f out/soong/build_number.txt ]; then
      rm out/soong/build_number.txt
    fi

    # Prepare the environment
    # Prepare the environment
    echo ">> [$(date)] Preparing build environment"
    echo ">> [$(date)] Preparing build environment"
    source build/envsetup.sh >/dev/null
    source build/envsetup.sh >/dev/null
@@ -320,16 +312,6 @@ for branch in ${BRANCH_NAME//,/ }; do
        echo ">> [$(date)] Switch to Python2"
        echo ">> [$(date)] Switch to Python2"
        ln -fs /usr/bin/python2 /usr/bin/python
        ln -fs /usr/bin/python2 /usr/bin/python


        export BUILD_DATETIME=$(date -u +%s)
        export BUILD_NUMBER=$(date -u -d @$BUILD_DATETIME +%Y%m%d)${CI_PIPELINE_ID}

        export BUILD_USERNAME=eos
        export BUILD_HOSTNAME=eos
        export DISPLAY_BUILD_NUMBER=true

        echo ">> [$(date)] BUILD_DATETIME=$BUILD_DATETIME"
        echo ">> [$(date)] BUILD_NUMBER=$BUILD_NUMBER"

        if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
        if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
          PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/')
          PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/')
          export PRODUCT_PRERELEASE
          export PRODUCT_PRERELEASE
@@ -369,6 +351,7 @@ for branch in ${BRANCH_NAME//,/ }; do
          echo ">> [$(date)] Starting signing target-files-package"
          echo ">> [$(date)] Starting signing target-files-package"


          # Set the target files name
          # Set the target files name
          BUILD_NUMBER=$(date -u +%Y%m%d)${CI_PIPELINE_ID}
          TARGET_FILES=lineage_$DEVICE-target_files-$BUILD_NUMBER.zip
          TARGET_FILES=lineage_$DEVICE-target_files-$BUILD_NUMBER.zip
          E_BRANCH_NAME=$e_ver-${branch_dir,,}
          E_BRANCH_NAME=$e_ver-${branch_dir,,}
          if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
          if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
@@ -395,9 +378,9 @@ for branch in ${BRANCH_NAME//,/ }; do
            done
            done
          fi
          fi


          if [ -f "$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_FILES" ]; then
          if [ "$(find $OUT/obj/PACKAGING/target_files_intermediates/ -name *-target_files*.zip -print -quit)" ]; then
            sign_target_files_apks "${SIGN_TARGETS[@]}" \
            sign_target_files_apks "${SIGN_TARGETS[@]}" \
              "$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_FILES" "$OUT/$TARGET_FILES"
              $OUT/obj/PACKAGING/target_files_intermediates/*-target_files*.zip "$OUT/$TARGET_FILES"


            if [ "$SIGN_BUILDS" = true ]; then
            if [ "$SIGN_BUILDS" = true ]; then
              SIGN_KEY=(-k "user-keys/releasekey")
              SIGN_KEY=(-k "user-keys/releasekey")
+3 −20
Original line number Original line Diff line number Diff line
@@ -198,14 +198,6 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
    fi
    fi
  fi
  fi


  # Remove build number and date on builds.
  if [ -f out/build_date.txt ]; then
    rm out/build_date.txt
  fi
  if [ -f out/soong/build_number.txt ]; then
    rm out/soong/build_number.txt
  fi

  # Prepare the environment
  # Prepare the environment
  echo ">> [$(date)] Preparing build environment"
  echo ">> [$(date)] Preparing build environment"
  source build/envsetup.sh >/dev/null
  source build/envsetup.sh >/dev/null
@@ -279,16 +271,6 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
      BRUNCH_DEVICE=lineage_${DEVICE}-userdebug
      BRUNCH_DEVICE=lineage_${DEVICE}-userdebug
    fi
    fi


    export BUILD_DATETIME=$(date -u +%s)
    export BUILD_NUMBER=$(date -u -d @$BUILD_DATETIME +%Y%m%d)${CI_PIPELINE_ID}

    export BUILD_USERNAME=eos
    export BUILD_HOSTNAME=eos
    export DISPLAY_BUILD_NUMBER=true

    echo ">> [$(date)] BUILD_DATETIME=$BUILD_DATETIME"
    echo ">> [$(date)] BUILD_NUMBER=$BUILD_NUMBER"

    if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
    if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
      PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/')
      PRODUCT_PRERELEASE=$(echo ${BRANCH_NAME} | sed -E 's/v[0-9]*\.[0-9]*(\.[0-9]*)?-(beta|alpha|rc).*/\2/')
      export PRODUCT_PRERELEASE
      export PRODUCT_PRERELEASE
@@ -321,6 +303,7 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
      echo ">> [$(date)] Starting signing target-files-package"
      echo ">> [$(date)] Starting signing target-files-package"


      # Set the target files name
      # Set the target files name
      BUILD_NUMBER=$(date -u +%Y%m%d)${CI_PIPELINE_ID}
      TARGET_FILES=lineage_$DEVICE-target_files-$BUILD_NUMBER.zip
      TARGET_FILES=lineage_$DEVICE-target_files-$BUILD_NUMBER.zip
      E_BRANCH_NAME=$e_ver-${branch_dir,,}
      E_BRANCH_NAME=$e_ver-${branch_dir,,}
      if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
      if [[ "${BRANCH_NAME}" = *"rc"* ]] || [[ "${BRANCH_NAME}" = *"alpha"* ]] || [[ "${BRANCH_NAME}" == *"beta"* ]]; then
@@ -347,9 +330,9 @@ if [ -n "${BRANCH_NAME}" ] && [ -n "${DEVICE}" ]; then
        done
        done
      fi
      fi


      if [ -f "$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_FILES" ]; then
      if [ "$(find $OUT/obj/PACKAGING/target_files_intermediates/ -name *-target_files*.zip -print -quit)" ]; then
        sign_target_files_apks "${SIGN_TARGETS[@]}" \
        sign_target_files_apks "${SIGN_TARGETS[@]}" \
          "$OUT/obj/PACKAGING/target_files_intermediates/$TARGET_FILES" "$OUT/$TARGET_FILES"
          $OUT/obj/PACKAGING/target_files_intermediates/*-target_files*.zip "$OUT/$TARGET_FILES"


        # Generate OTA zip
        # Generate OTA zip
        echo ">> [$(date)] Generating OTA zip from target-files-package"
        echo ">> [$(date)] Generating OTA zip from target-files-package"